\documentclass[12pt]{article}
%\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fullpage}
\usepackage{amsmath}
\usepackage{amsthm}
\usepackage{array}
\usepackage{color}
\usepackage{graphicx}
\usepackage{float}
\PassOptionsToPackage{hyphens}{url}
\usepackage[hidelinks]{hyperref}
\usepackage{listings}
\usepackage[margin=1in]{geometry}
\usepackage{setspace}
\usepackage{natbib}
\usepackage{proof}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{wrapfig}
\usepackage [english]{babel}
\usepackage{grffile}
\usepackage{tikz}
\usepackage{pgfplots}
\usepackage[tikz]{bclogo}
\usetikzlibrary{chains}
\usetikzlibrary{positioning}
\usetikzlibrary{arrows}
\usepackage{lscape}
\usepackage [autostyle, english = american]{csquotes}
\usepackage{enumitem}
\usepackage{caption}
\usepackage{subcaption}
\usepackage{indentfirst}
\usepackage{hyperref}
\usepackage{pdfpages}
\usepackage{booktabs}
\newcommand{\tabitem}{~~\llap{\textbullet}~~}
\bibliographystyle{apsr}
\bibpunct{(}{)}{;}{a}{,}{,}
\DeclareGraphicsExtensions{.pdf,.png,.jpg}
\setlength{\tabcolsep}{.18cm}
\usepackage{fancyvrb}
\usepackage{sectsty}
\sectionfont{\fontsize{14}{14}\selectfont}
\subsectionfont{\fontsize{12}{12}\selectfont}
\usepackage{numprint}
\npthousandsep{,}

% \pgfplotsset{compat=1.7}  % added by DR
% \DeclareUnicodeCharacter{2212}{-}

\usepackage{listings}
\lstset{
basicstyle=\small\ttfamily,
columns=flexible,
breaklines=true
}

% COLOR CODING OUR COMMENTS
\newenvironment{bluetext}{\color{blue}}{\ignorespacesafterend} 

% ==Cross Referencing Different Docs
\usepackage{xr}
\externaldocument{ColombiaCOVID_SI5}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\title{\Large When Pandemic Threat Does Not Stoke Xenophobia:\\
Evidence from a Panel Survey around COVID-19
\footnote{We are grateful to colleagues at the Centro Nacional de Consultoria (CNC) for survey administration. We thank the UBC Comp-Can Workshop, ASU Political Economy Working Group, UCLA CSIM Seminar for helpful comments.
%We acknowledge funding support from XXX. 
}
\footnote{This research received institutional review board (IRB) approval from 
UCLA (\#19-001733) and UBC ($\#$H19-03288). % comment to anonymize
%XXX and YYY Universities. % uncomment for anonymized version
Our Pre-Analysis Plan (PAP) was archived in the OSF repository
\url{https://osf.io/kuwch}. % comment to anonymize
%\url{https://osf.io/pwvzq/download} (anonymized). % uncomment for anonymized version
All replication material, including {\tt R} code and data, will be made available via Harvard University's Dataverse. Competing interests: The author(s) declare none.
}
}

\author{Yang-Yang Zhou\thanks{Assistant Professor, Department of Government, Dartmouth College and CIFAR Fellow, \href{mailto:yang-yang.zhou@dartmouth.edu}{yang-yang.zhou@dartmouth.edu}, \href{https://www.yangyangzhou.com/}{www.yangyangzhou.com}}
\hspace{1.5cm}
Daniel Rojas\thanks{Ph.D. Candidate, Department of Political Science, University of British Columbia, \href{mailto:daniel.rojaslozano@ubc.ca}{daniel.rojaslozano@ubc.ca}}
\hspace{1.5cm}
Margaret Peters\thanks{Associate Professor, Department of Political Science, UCLA, \href{mailto:mepeters@ucla.edu}{mepeters@ucla.edu}, \href{http://www.maggiepeters.com/}{www.maggiepeters.com}}
}



\date{\today}
%%%%%%%%%%%%%%%%% END OF PREAMBLE %%%%%%%%%%%%%%%%


\begin{document}


<<eval=TRUE,echo=FALSE, results='hide', message=FALSE>>= 
library(knitr)

opts_chunk$set(cache = TRUE, 
        cache.path = 'cache_paper/',
        fig.path = 'figures_paper/', 
        tidy = TRUE, 
        echo = FALSE, 
        warning = FALSE, 
        message = FALSE, 
        fig.pos = 'H',
        dev = 'pdf', 
        dpi=200)

options(width = 110, digits = 1, scipen=10000)

@


\maketitle

\begin{abstract} 
\begin{singlespace} % 151 words (can be no more than 200)
\noindent Studies have found that pandemics can heighten xenophobia among host citizens, often explained by the behavioral immune system theory (BIS) or elite-driven scapegoating. However, most research has overlooked the role of pandemic-related economic restrictions and job loss on sentiment toward immigrants. To isolate this economic mechanism, we examine the case of Venezuelan migrants in Colombia before and during COVID-19. Despite the Colombian government's severe economic lockdown, few politicians blamed Venezuelans for the pandemic. Thus, any economic impact on xenophobia should be evident. Using a panel experimental survey of 374 Colombians, supplemented with 550 new respondents at endline, we find no evidence that exposure to COVID-19 changed attitudes towards Venezuelans, even for those directly affected by the pandemic. Yet, those who did not lose their jobs viewed Venezuelan migration more positively at endline, providing support for the economic effects of pandemics.\\

\textbf{Keywords:} COVID-19, migration, pandemic, xenophobia, Colombia, Venezuela\\
%\textbf{Word count:} 
\end{singlespace} 
\end{abstract}

<<eval=TRUE, echo = FALSE, tidy=TRUE, warning=FALSE, error=FALSE, message=FALSE>>=

setwd("Paper_Inputs")

## Load data and functions
library(estimatr, quietly = TRUE)
library(foreign, quietly = TRUE)
library(ggplot2, quietly = TRUE)
library(tidyverse, quietly = TRUE)
library(reshape2, quietly = TRUE)
library(gtools, quietly = TRUE)
library(stringr, quietly = TRUE)
library(patchwork, quietly = TRUE)
library(knitr, quietly = TRUE)
library(kableExtra, quietly = TRUE)
library(CBPS, quietly = TRUE)
library(sp, quietly = TRUE) #GIS packages
library(spdep, quietly = TRUE)
library(rgdal, quietly = TRUE)
library(maps, quietly = TRUE)
library(mapdata, quietly = TRUE)
#library(maptools, quietly = TRUE)
library(ggmap, quietly = TRUE)
library(lfe, quietly = TRUE)
library(foreach, quietly = TRUE)
library(data.table, quietly = TRUE)
#library(equivtest, quietly = TRUE) # equivalence analysis
library(haven, quietly = TRUE)
library(survey, quietly = TRUE)

'%notin%' <- Negate('%in%')

'%notin%' <- Negate('%in%')

## ggplot theme
yy_theme <- function(){
  theme(panel.background = element_blank(),
          legend.title = element_blank(), 
          plot.title = element_text(size = 10),
          panel.border = element_rect(colour = "gray70", fill=NA, size=.11),
          legend.position = "none",
          axis.text.x = element_text(angle=0, vjust=0, hjust = .4, size=11))
}

# load 2019 data
df_col <- read_csv("colombia_clean.csv")

df_col <- df_col %>% # rescale these variables to min 0 max 1 for observational regression analysis
 mutate(dir_contact_bi = case_when(dir_contact_index > 1~1, 
                  dir_contact_index <= 1~0,
                      TRUE~NA_real_),
     open_index_res = scales::rescale(open_index), 
     partisanship_res = scales::rescale(partisanship),
     skilled_labor_res = scales::rescale(skilled_labor),
     contract_res = scales::rescale(contract),
     salary_res = scales::rescale(salary),
     benefits_index_res = scales::rescale(benefits_index),
     dir_contact_index_res = scales::rescale(dir_contact_index),
     indir_contact_index_res = scales::rescale(indir_contact_index),
     cultural_index_res = scales::rescale(cultural_index)
     ) 

df_col_cali <- df_col[df_col$city == "Cali",]
df_col_cucuta <- df_col[df_col$city == "Cúcuta",]

# load 2021 panel data
col_wide <- read_csv("col_wide.csv") %>% mutate(open_index_4q_b = scales::rescale(open_index_4q_b), 
                                                # rescale openness to be between 0 and 1
                                                open_index_4q_e = scales::rescale(open_index_4q_e))

col_long <- read_csv("col_long.csv") %>% mutate(open_index_4q = scales::rescale(open_index_4q))

col_wide$recontacted <- 1
col_wide$recontacted2 <- "Recontacted"

col_long <- col_long %>%
  mutate(period = fct_relevel(period, "baseline", "endline"),
         period_x_treatment = (period == "endline") * covid_first,
         #city_num = case_when(city_num == 1~1, city_num == 2~0, TRUE~NA_real_),
         religion_cath = case_when(religion2 == 1~1, !is.na(religion2)~0, TRUE~NA_real_),
         religion_evan = case_when(religion2 == 2~1, !is.na(religion2)~0, TRUE~NA_real_),
         religion_other = case_when(religion2 == 3~1, !is.na(religion2)~0, TRUE~NA_real_),
         race_mestizo = case_when(race == 2~1, !is.na(race)~0, TRUE~NA_real_),
         cov_selffamily = case_when((cov_self == 1 | cov_family == 1)~1, 
                                   (cov_self == 0 & cov_family == 0)~0,
                                    TRUE~NA_real_),
         ven_friends_bi = case_when(ven_friends > 0~1, ven_friends == 0~0, TRUE~NA_real_),
         migQ_first = case_when(covid_first == 0~1, covid_first == 1~0,  TRUE~NA_real_),
         cov_natgov_bi = case_when(cov_natgov >= 3~1, cov_natgov <3~0, TRUE~NA_real_),
         cov_locgov_bi = case_when(cov_locgov >= 3~1, cov_locgov <3~0, TRUE~NA_real_)
  )

# attrited group
df_col_attrit <- df_col[which(toupper(df_col$name) %notin% col_wide$name),]
df_col_attrit$recontacted <- 0
df_col_attrit$recontacted2 <- "Attrited"

# load 2021 crossectional data
col_cross <- read_csv("col_cross.csv") %>% 
  mutate(open_index_4q = scales::rescale(open_index_4q), 
         city_num = case_when(city_num == 1~1, city_num == 2~0, TRUE~NA_real_),
         religion_cath = case_when(religion2 == 1~1, !is.na(religion2)~0, TRUE~NA_real_),
         religion_evan = case_when(religion2 == 2~1, !is.na(religion2)~0, TRUE~NA_real_),
         religion_other = case_when(religion2 == 3~1, !is.na(religion2)~0, TRUE~NA_real_),
         race_mestizo = case_when(race == 2~1, !is.na(race)~0, TRUE~NA_real_),
         kids = as.numeric(kids),
         city = case_when(city == "1"~"Cali", city == "2"~"Cúcuta", TRUE~city),
         cov_selffamily = case_when((cov_self == 1 | cov_family == 1)~1, 
                                   (cov_self == 0 & cov_family == 0)~0,
                                    TRUE~NA_real_),
         ven_friends_bi = case_when(ven_friends > 0~1, ven_friends == 0~0, TRUE~NA_real_),
         migQ_first = case_when(covid_first == 0~1, covid_first == 1~0,  TRUE~NA_real_),
         cov_natgov_bi = case_when(cov_natgov >= 3~1, cov_natgov <3~0, TRUE~NA_real_),
         cov_locgov_bi = case_when(cov_locgov >= 3~1, cov_locgov <3~0, TRUE~NA_real_)
         )

col_new <- col_cross[col_cross$panelist == 0,]

# Latinobarometer and LAPOP surveys
all_groups <- readRDS('all_groups.rds')
data_ipa <- readRDS('data_ipa.rds')
lb_col_20 <- readRDS('latinobarometer_col_20.rds')
lapop21_total <- readRDS('lapop_col_21.rds')
lapop21_a <- readRDS('lapop_col_21_a.rds')
lapop21_b <- readRDS('lapop_col_21_b.rds')

# LAPOP weights
lapop_weights <- read_csv("LAPOPweights.csv")
 
# 2019 survey data
colombia = read.csv('colombia_clean.csv') %>% 
    mutate(mestizo = ifelse(race==2,1,0),
           nationality = 'Colombians') 

venezuela = read.csv('venezuelans_clean.csv') %>% 
    mutate(mestizo = ifelse(race==2,1,0),
           nationality = 'Venezuelans') 

dt_race = rbind(colombia %>% dplyr::select(race, mestizo, city, nationality), 
           venezuela %>% dplyr::select(race, mestizo, city, nationality))

@

\pagenumbering{gobble}

\newpage
\pagenumbering{arabic}
\setcounter{page}{1}
\setstretch{1.8}


How does a pandemic affect attitudes of host citizens toward migrants?\footnote{Throughout this paper, we use ``migrants'' to describe the Venezuelans who recently entered Colombia due to the economic and political crisis in Venezuela. Technically, ``refugee'' is a limited legal construct, which many Venezuelan migrants in our study do not qualify. We recognize that many Venezuelans could qualify for refugee status under international law.  Nonetheless, we refer to them in this paper as \textit{migrants}, recognizing that this is not a value-neutral term, as this is how the Colombian government and the UNHCR refer to Venezuelans.} Many studies of pandemics have found increased anti-immigrant and anti-minority attitudes and behaviors \citep[e.g.][]{Green:2010, dionne2015perceptions, prati2016knowledge, Aaroe:2017, Adida:2018, Marshall:2018, reny2020xenophobia, lu2021priming, dipoppa2023locked}. However, other studies have found few effects of pandemics on anti-immigrant sentiment and xenophobia \citep{daniels2021has,drouhot2021has}.

One of the major theories to explain the rise in anti-immigrant views and behaviors is the behavioral immune system (BIS) hypothesis. This hypothesis argues that disease threat leads to increased xenophobia in general as people see minorities or immigrants as potential vectors of disease and seek to remove that threat \citep[e.g.][]{Green:2010, dionne2015perceptions, prati2016knowledge, Aaroe:2017, Marshall:2018, reny2020xenophobia, lu2021priming}. One question, though, is how do individuals know whether and which minorities to blame for the disease?  We believe that elite rhetoric has an important effect on the stigmatizing immigrants or minorities as vectors of disease. A difference between the studies that have found an effect of disease on anti-immigrant sentiments is the role of elites. For example, \citet{drouhot2021has} find a null effect of the pandemic on views in Germany, where leaders did not blame immigrants for the pandemic versus \citet{dipoppa2023locked}, who find an effect in Italy where leaders were actively hostile toward immigrants. 

In addition to the disease, COVID-19 had severe economic effects: most countries required workplaces to shut down for at least a time, and many countries fell into a short recession. Scholars have found that recessions \citep{goldstein2014nativism} and job losses \citep{hopkins2022personal} can also increase anti-immigrant sentiment. This suggests that the economic effects of the pandemic could be partly responsible for changes in public opinion. The recent studies finding a positive effect of pandemics on xenophobia were conducted in the US and Italy \citep{dipoppa2023locked}, where social safety nets are relatively small, compared to another study showing a more limited effect in Germany \citep{drouhot2021has}, which has a more robust social safety-net. Thus, it could have been the economic situation, and not the pandemic per se or elite framing, that led to an increase in anti-immigrant sentiment. 

To isolate economic concerns, we assess whether COVID-19 exposure has changed attitudes in the context of Colombian citizens' attitudes toward Venezuelan migrants. With over 1.7 million Venezuelans, Colombia is the second-largest forced migrant-hosting country in the world.\footnote{\href{UNHCR Venezuela Situation}{https://www.unhcr.org/en-us/venezuela-emergency.html}} In addition, Colombia, as a developing country, has a small welfare state, which may mean that the economic effects had a stronger impact. Our setting also adds to a growing literature on migration attitudes in the Global South \citep[e.g.][]{alrababa2019attitudes, rozo2021brothers, argote2024formation, holland2024left} and helps us understand if theories developed in the Global North travel to understudied contexts.
There was also little anti-immigrant rhetoric from elites during the early part of the pandemic; in fact, not long after our study was completed, the Colombian government announced a generous temporary protection status for Venezuelans. Thus, if economic concerns led anti-immigrant sentiment, we should find a large effect of the pandemic on attitudes. On the other hand, if elite rhetoric matters, we should find a more limited effect of the pandemic. 

Lastly, this context also allows us to test the basic BIS theory, which posits that exposure leads to anti-immigrant sentiment, based on the relatively high rates of transmission of COVID-19 in Colombia \citep{faulkner2004evolved, schaller2021behavioural}. If BIS is correct, we expect those with greater exposure to COVID (i.e. having had it or having a family member who had it) to show greater levels of opposition. Alternatively, if BIS holds only in cases in which the marginalized group is culturally more distant, we should find a smaller effect of the pandemic in Colombia than in the Global North, where migrants tend to differ from host in terms of race, ethnicity, and/or religion \citep{schewel2023global}. These differences can heighten the effect of disease threat on anti-immigrant sentiment because individuals cue otherness from appearance \citep{esses2021xenophobia, freitag2022pandemic, suhardiman2021coattails}. To be clear, we are not arguing that the presence of cultural ties prevents xenophobia. Xenophobia can take root even in coethnic contexts, because there are always other points of difference that can take the place of ethnicity. In fact, \citet{holland2024left} find in Colombia that when political elites instrumentally emphasize political differences between Colombians and Venezuelan migrants for electoral purposes, Colombians will increase anti-migrant attitudes. Nevertheless, by studying migration in a context where migrants are likely to share racial, ethnic, religious, and linguistic ties--such as the case of Venezuelans in Colombia--we hope to control for cultural ties in order to isolate whether or not there is an economic effect of pandemics.

While migrant-hosting policies in Colombia have been generous \citep{ibanez2021life}, Colombian citizens still hold largely negative views toward Venezuelan migrants \citep{rozo2021brothers,holland2024left}. In this paper, we ask whether these views worsened during the pandemic. Before the outbreak of COVID-19 in fall 2019, we conducted face-to-face surveys with about 1,000 Colombians living in two cities, Cali and C\'ucuta, on their attitudes toward Venezuelan migrants. In winter 2021, we re-interviewed 374 respondents using computer-assisted telephone interviewing (CATI). We examine the link between concerns about disease and xenophobia in a massive migration crisis by examining the change in views \textit{within respondents} rather than over different cross-sections. This allows us to identify better whether COVID-19 has \textit{changed} attitudes. 

To supplement this panel sample, we also surveyed 550 new respondents that were stratified sampled based on the demographics of the 2019 baseline respondents we could not re-contact. For the 2021 (endline) survey, we also embedded an experimental component in which we randomized the order between question blocks asking about COVID-19 versus migration attitudes; those who received the COVID-19 question block first ("COVID-first") are therefore primed to think about how the pandemic has affected them and their family before answering questions about migration attitudes. 

Counter to the studies in the US or Italy, we find little evidence that the COVID-19 threat leads to an increase in anti-migrant sentiment in most respondents. While Colombians wanted borders to remain closed, we did not see increased opposition. Our COVID-first treatment had little effect either. We find little evidence that having had COVID-19 or a close family member with the disease affects migration beliefs, rejecting the basic BIS hypothesis. Instead, attitudes were stable for most groups. 

There was one subgroup for whom we did find effects: those unharmed economically by the pandemic shutdowns---including those whose incomes went up, took a new job, or those whose income remained the same or kept their job---became more positively disposed towards Venezuelans. This provides support for our argument that pandemics can affect immigration attitudes through their economic aftereffects. But instead of focusing on loss, like many studies have, our study points to how economic stability through turbulent times may positively influence immigration attitudes.

Our findings show that prejudice towards outsiders is not an inevitable repercussion of pandemics. In our discussion of the results, we theorize that stability or even an increase in support for immigrants may be a result of the political environment. Politicians in the Global North often blamed China and Chinese citizens and immigrants for the disease, with US President Trump going as far as calling it the ``Kung Flu.'' Other migrants in the Global North were not immune, either: many right-leaning politicians portrayed asylum-seekers to the US and elsewhere as carriers of the disease. Yet, we find little discussion among elites in Colombia discussing Venezuelan migrants in this light. Whereas cases of pandemic-driven xenophobia can be traced to politicians' scapegoating migrant groups \citep{Devakumar:2020, freier2021covid}, our study points to a case in which the state announced support for migrants in a time of crisis. Our findings also align with recent research (conducted in the US and Europe) showing that attitudes towards immigration are remarkably stable over time \citep{kustov2021stability}.  


\section*{How Pandemics might affect Attitudes towards Migrants}

We review two groups of theories by which the pandemic could have affected opinions on immigration: theories based on a direct link between disease and anti-immigrant sentiment and those based on an indirect link through the economic effects of lockdowns. Of course, there is also the null hypothesis that the pandemic has had little to no impact on views on immigrants. 

\subsection*{Direct links between disease fears and anti-migrants sentiments}

This study builds on research across the social sciences that examines the link between fears of disease with xenophobia, support for stricter immigration policy, and dehumanization of migrants \citep[e.g.][]{Green:2010,Aaroe:2017,Marshall:2018,schaller2011behavioral}. A few different hypothesized mechanisms link fear of a disease with discrimination towards outgroups, especially towards immigrants. The first mechanism is the ``behavioral immune system,'' (BIS) a set of psychological tools that developed to keep humans away from pathogens. The threat of a pathogen leads people to avoid what might carry that pathogen, including people thought to have the disease \citep{schaller2011behavioral}. Biological fears tend to become universal \textit{social} concerns around insider and outsider status, with outsiders seen as disease carriers \citep{douglas1966purity}. These societal concerns around impurity then can be connected with immigration; a prominent outsider group, such as refugees and asylum-seekers are, in particular, often linked to disease and threats to national security \citep{malkki1995purity}.\footnote{See also \citet{faulkner2004evolved, Green:2010, kim2016fear, prati2016knowledge}.} 

Second, the social boundaries between majority and minoritized groups intensify during outbreaks of unknown diseases; in-group members blame outgroup members to regain a sense of control \citep{dionne2020politics}.  Similar to what we might call ``Travel Ban Theater''\footnote{https://www.thelancet.com/journals/lancet/article/PIIS0140-6736(21)02752-5/fulltext}---in which politicians enact travel bans from countries with disease outbreaks after the infection has spread---taking political action against minoritized groups is ``doing something'' in the face of a difficult-to-solve threat. The perceived cultural difference between the majority group and immigrant/minority group also seems to matter; the threat is less intense or non-existent for immigrants who are seen as less distinct \citep{faulkner2004evolved, schaller2021behavioural}, which may be the case in our study. Regardless of the mechanism, greater exposure to an epidemic is likely to trigger greater anti-immigrant sentiment \citep{hartman2020authoritarian, wamsler2020pandemic}, at least to more unfamiliar or more culturally distant groups. 

There is a long history connecting disease outbreaks and anti-immigrant sentiment. At the turn of the 20th century, Irish, Italian, Jewish, Chinese, and Mexican immigrants in the US were blamed for outbreaks of cholera, polio, tuberculosis, bubonic plague, and typhus, respectively \citep{kraut1995silent,power1995media,markel1999quarantine,mckiernan2012five}. %Immigrants to the US have further been stigmatized as vectors of diseases despite these fears being empirically unfounded \citep{markel2002foreignness}. 
More recently, the HIV/AIDS-epidemic and Ebola outbreak have led to the discrimination and exclusion of migrants from Caribbean and African nations \citep{fairchild1994policies,dionne2015perceptions}.\footnote{See \citet{dionne2020politics} for a thorough review.}

%%% current work on xenophobia tied to COVID
Concerning the current COVID-19 pandemic, several papers point to an increase in prejudice and xenophobia, particularly towards people of East Asian descent \citep[whether native- or foreign-born;][]{Coates:2020, freitag2022pandemic, Ng:2020, wamsler2020pandemic}. In a panel study, \citet{yamagata2020relationship} find that anti-foreigner attitudes increased during the early pandemic in Japan. In the US, \citet{reny2020xenophobia} find growing support for xenophobic policies related to the pandemic when these policies target Asians rather than other immigrant groups. 

Beyond affecting people of Asian descent, COVID-related xenophobic sentiments can transfer to other migrant and minority groups \citep[e.g.][]{jillson2020costa, freier2021covid}. A recent vignette experiment conducted in the US found that priming COVID-19 increases prejudice not only toward Asians but also toward Hispanics \citep{lu2021priming}. This extended prejudice is relevant in contexts of preexisting economic and social inequalities between citizens and migrants, \textit{and} where migrants, such as Venezuelans in Colombia, are eligible for social welfare benefits. Qualitative evidence in Latin America points to heightened concerns over economic competition and welfare resources. For example, the perception of immigrants as a burden to public services increased opposition to immigration during the pandemic in Peru, while in Chile, both the government and media outlets attributed irregular migration as a driver of the increasing number of COVID-19 cases, thus sparking xenophobic attitudes in the host population \citep{freier2021covid}. 

On the other hand, through a survey in Germany pre- and post-COVID outbreak, \citet{drouhot2021has} find that attitudes towards diversity and toward Asian-origin populations have remained stable. They argue that although there are surges in racist incidents, these xenophobic actions do not reflect the broader public opinion. \citet{daniels2021has} conduct a survey experiment in California to test whether priming respondents with the pandemic increase negative attitudes toward migrants. They find that the COVID-19 prime did not increase xenophobic attitudes, and in fact, attitudes toward immigrants' contributions became more positive, especially among Asian-American and Latino respondents.\footnote{These results are similar to \citet{boxell2021affective}, which found that affective partisanship decreased during the pandemic.} These findings suggest that whether disease threat will engender xenophobia is highly contextual, which we discuss further in the following subsection. Finally, in the US, Gadarian, Goodman, and Pepinsky \citeyearpar{gadarian2022pandemic,gadarian2022racial} find that while there was increased support for travel bans and anti-immigration policies, this support was driven by racial resentment and partisanship, not fear of the disease itself.

\subsection*{Indirect mechanism of pandemics' economic consequences}

The COVID-19 pandemic led to lockdowns and shuttering of businesses in most countries in the world, leading to a global recession.\footnote{\url{https://www.worldbank.org/en/news/feature/2021/06/08/the-global-economy-on-track-for-strong-but-uneven-growth-as-covid-19-still-weighs}}  It could be the economic effects of the pandemic and, not the pandemic per se, led to increased anti-immigrant sentiment. %Significant economic recessions, like the Great Depression, have increased anti-immigrant sentiment; but the link between recessions and opposition to immigration is not automatic \citep{peters2017trading}. Instead, individuals' exposure to individual economic losses, and not general economic conditions, seems to drive increases in anti-immigrant sentiment. 
For example, \citet{goldstein2014nativism} find that in their panel, those who perceive they have suffered economic losses increase their opposition to immigration. \citet{hopkins2022personal}, also using a panel survey in the US, show that job losses and decreases in income lead to increased anti-immigrant sentiment. Around the COVID-19 pandemic, \citet{dipoppa2023locked} show that hate crimes towards Asian migrants increased substantially after the start of the pandemic, but that it was economic concerns rather than the threat of infection that triggered the violence. Similarly, \citet{dhanani2021public} found that frames around the economic effects of COVID-19 increased anti-Asian sentiment.\footnote{They also found that framing the disease as coming from Asia increased anti-immigrant sentiment \citep{dhanani2021public}.}  %Building on this literature, it could be that employment or income loss due to the pandemic, rather than fears over the disease, led to an increase in anti-immigrant sentiment. 


In this paper, we theorize that absent ethnic and cultural differences, the economic effects of a pandemic can change host citizens' attitudes towards migrants and migration policies. In particular, citizens who experienced job loss or financial stress from the pandemic will develop more anti-migrant attitudes. 


\section*{Context: Venezuelan Migrants in Colombia}

Migration flows between Colombia and Venezuela have a long history due to their geographical and cultural proximity \citep{lobo2021restos}.  Decades ago, Colombians used to migrate to Venezuela to flee crime and political violence, increasing ties between the two states. In fact, in 1999, 87\% of Colombians perceived Venezuela as a brother country, and 84\% believed both countries had a shared history \citep{argote2024formation}. However, the trend changed with the economic and political turmoil of the socialist revolution started by Hugo Ch\'{a}vez.  While there were small numbers of anti-Ch\'{a}vez/Maduro migrants prior to 2015,  migration accelerated substantially post-2015, as economic and humanitarian conditions worsened under President Nicol\'as Maduro. Colombia received the highest number of migrants from Venezuela, reaching 1.7 million registered migrants in January 2021, when we fielded our endline survey. 

The Colombian government has broadly welcomed Venezuelan migrants. In July 2017, Colombian President Santos created special residency permits, El Permiso Especial de Permanencia (PEP), which granted Venezuelans two years of legal residency, the right to work in the formal sector, and access to the social assistance program Sistema de Seleccion de Beneficiarios Para Programas Sociales (Sisb\'en). During the first two waves of the PEP program, approximately 182,000 Venezuelans regularized their status \citep{bahar2021give}. In February 2021, after our survey was fielded, President Duque announced a second, more generous regularization program for Venezuelans for ten years.

We might expect that because of the cultural proximity between Colombians and Venezuelans, that the public would be broadly supportive of their migration.  However, even though policy towards Venezuelans has been generous, average Colombians generally has opposed their immigration.  For example, \citet{holland2020explaining} and \citet{argote2024formation} both found widespread opposition to Venezuelans in Colombia prior to the start of the pandemic.  In late 2020, Latinobarometer surveyed Colombians and found that about 76\% of respondents thought that receiving immigrants from Venezuela was a bad thing.\footnote{\url{https://www.latinobarometro.org/latContents.jsp}} This opposition to Venezuelans seems to have affect voting behavior prior to the pandemic, with those areas with greater numbers of Venezuelans voting for the right \citep{rozo2021brothers}.  Both \citet{holland2020explaining} and \citet{rozo2021brothers} argue that this opposition has largely been driven by the use of anti-Venezuelan rhetoric by right-leaning elites during elections to drum up opposition to left-leaning politicians. In contrast, \citet{argote2024formation} argue that labor market competition, particularly within low-skilled respondents, fueled migrant rejection. And while ethnic proximity did not attenuate negative effects, familial proximity and direct contact do. They also note, like in this paper, that political elites at the time of their study (2020) did not take a hard stance against migrants. 


\subsection*{Impact of COVID-19 on Colombia}

Colombia reported its first confirmed case of COVID-19 on March 6, 2020. On March 14, Colombia closed its borders with Venezuela and declared a country-wide quarantine starting March 25.\footnote{\url{http://www.mixedmigration.org/wp-content/uploads/2020/05/099_covid_snapshot_LAC_en.pdf}} The quarantine remained in place through spring and early summer 2020 when it was rolled back as cases fell. Yet, the quarantine was brought back due to a late 2020 surge in cases. When our survey was fielded in early January, renewed stay-at-home and work-from-home restrictions were in place. The border remained closed throughout 2020 and early 2021 until May 2021 \citep{hale2020variation}. As of January 12, 2021, when our survey went into the field, there had been over 1.8 million confirmed cases in Colombia and over 46,000 deaths, many more cases in the province around Cali (with almost 150,000 cases) than around C\'ucuta (with about 44,000 cases).\footnote{COVID-19 data is from \citet{DONG2020533}.} 

Figure \ref{fig:covid_migflows_timeline} shows the timing of our baseline and endline surveys with net migrant flows (top row) and new COVID-19 cases (bottom row) nationwide and in our two survey cities. At endline, due to border closures, the number of new Venezuelan migrants was essentially zero, and the total number of Venezuelans was down by 6\%, as some migrants returned home or moved elsewhere.\footnote{\url{https://data2.unhcr.org/en/documents/details/83911}} 

<<covid_migflows_timeline, eval = TRUE, echo = FALSE, tidy=TRUE, fig.pos = 't', fig.width = 9.5, fig.height = 6, out.width= "1\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, fig.cap="This figure shows the net arrivals of Venezuelan migrants (top row) and the number of new COVID-19 cases (bottom row) for Colombia nationwide, and our survey cities Cali and Cúcuta. The gray shading indicates when we conducted our baseline and endline surveys.">>=

setwd("Paper_Inputs")

##### NEW COVID CASES

# Data sources: datos.gov.co (municipal data) & datosabiertos.esri.co (national data)
# Load national-level data
col_cases <- read.csv("national_level_covid.csv") %>% 
  rename(., new_cases = NUEVOS_CASOS) %>% 
  mutate(date = as.Date(FECHA_ACTUALIZACION),
         month = month(date),
         year = year(date)) %>% as.data.table(.)

# Plot - National cases
covid_colombia <- col_cases[, .(cases=sum(new_cases)), by=.(year,month)] %>% 
  .[, date_monthly := seq(as.Date("2020/03/06"), as.Date("2021/07/12"), length.out = 17)] %>% 
  ggplot(., aes(x=date_monthly, y=cases)) + 
  geom_rect(xmin = as.Date("2021/01/10"), xmax=as.Date("2021/02/24"), ymin=-Inf, ymax=Inf,
            fill = "#CCCCCC") +
  geom_line() +
  ggtitle("Colombia") +
  xlab("") + ylab("New COVID-19 cases") + 
  theme(
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8)) + 
  scale_x_date(date_labels = "%b %Y") +
  annotate("text", x=as.Date("2020/11/01"), y=650000, label= "Endline")

# Load municipal-level data (use data.table due to data size)
mun_cases <- read.csv("municipal_level_covid.csv") %>% as.data.table(.)
mun_cases <- mun_cases[Nombre.municipio %in% c("CALI","CUCUTA"), ]

## Aggregate data by municipality and date
mun2_cases <- mun_cases[, .N, by=.(Nombre.municipio,Fecha.de.diagnóstico)] %>% 
  setnames(., c("Nombre.municipio","Fecha.de.diagnóstico","N"),
         c("city","date","cases"))

### adjusting date format
mun2_cases[, date_ := format(as.POSIXct(date,format='%d/%m/%Y %H:%M:%S'),format='%Y/%m/%d') %>% 
             as.Date(.)]
mun2_cases[, `:=` (month = month(date_),
                   year = year(date_))]

# Plot - Cases in Cali & Cúcuta
covid_cali <- mun2_cases[city=="CALI", .(cases_=sum(cases)), by=.(year,month)] %>% 
  .[, date_monthly := seq(as.Date("2020/03/13"), as.Date("2021/07/12"), length.out = 18)] %>% 
  ggplot(., aes(x=date_monthly, y=cases_)) + 
  geom_rect(xmin = as.Date("2021/01/10"), xmax=as.Date("2021/02/24"), ymin=-Inf, ymax=Inf,
            fill = "#CCCCCC") +
  geom_line() +
  ggtitle("Cali") +
  xlab("") + ylab("") + 
  theme(
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8)) + 
  scale_x_date(date_labels = "%b %Y")

covid_cucuta <- mun2_cases[city=="CUCUTA", .(cases_=sum(cases)), by=.(year,month)] %>% 
  .[, date_monthly := seq(as.Date("2020/03/13"), as.Date("2021/07/12"), length.out = 18)] %>% 
  ggplot(., aes(x=date_monthly, y=cases_)) + 
  geom_rect(xmin = as.Date("2021/01/10"), xmax=as.Date("2021/02/24"), ymin=-Inf, ymax=Inf,
            fill = "#CCCCCC") +
  geom_line() +
  ggtitle("Cúcuta") +
  xlab("") + ylab("") + 
  theme(
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8)) + 
  scale_x_date(date_labels = "%b %Y")


covidplot <- covid_colombia + covid_cali + covid_cucuta + plot_layout(ncol = 3, guides = "collect") +
  plot_annotation(title = "New Covid-19 Cases in Colombia")


##### MIGRATION NET FLOWS
# function to reshape data
reshaping <- function(dataset, year){
  x= pivot_longer(dataset, names(dataset[-c(1)])) %>% 
    pivot_wider(., names_from = "Entrada.Salida", values_from = "value") %>% 
    rename(month=name, inflow=Entradas, outflow=Salidas) %>% 
    mutate(year=year,
           inflow = as.character(inflow) %>% gsub(",","", .) %>% as.integer(.),
           outflow = as.character(outflow) %>% gsub(",","", .) %>% as.integer(.),
           net_migration = rowSums(cbind(inflow, outflow*-1), na.rm = TRUE),
           month_eng = seq(as.Date("2017/1/1"), as.Date("2017/12/31"), by = "month") %>% 
             format(., "%b"))
  return(x)
}


# National flows ----------------------------------------------------------

# Load datasets (national flow)
datasets <- lapply(Sys.glob("flow*.csv"), read.csv)

# adjust data for 2020
datasets[[4]] <- datasets[[4]]  %>% mutate(Abril=as.factor(Abril),
                                           Mayo=as.factor(Mayo),
                                           Junio=as.factor(Junio),
                                           Julio=as.factor(Julio),
                                           Agosto=as.factor(Agosto))


datasets2 <- foreach(i=1:4, b=2017:2020) %do% reshaping(datasets[[i]], b)

# Specify dates for 2021 (there are 4 months)
flow2021 <- datasets[[5]] %>% 
  pivot_longer(., names(.[-c(1)])) %>% 
  pivot_wider(., names_from = "Entrada.Salida", values_from = "value") %>% 
  rename(month=name, inflow=Entradas, outflow=Salidas) %>% 
  mutate(year=2021,
         inflow = as.character(inflow) %>% gsub(",","", .) %>% as.integer(.),
         outflow = as.character(outflow) %>% gsub(",","", .) %>% as.integer(.),
         net_migration = inflow-outflow,
         month_eng = seq(as.Date("2021/1/1"), as.Date("2021/4/30"), by = "month") %>% 
           format(., "%b")) 

## Adding flow2021 into datasets2 list
datasets2[[length(datasets2)+1]] <- flow2021

# create a dataframe
migrant_flow <- data.table::rbindlist(datasets2) %>% 
  mutate(period = seq(as.Date("2017/1/1"), as.Date("2021/4/30"), by="month"))


# Plot
col_flow <- ggplot(migrant_flow, aes(x=period, y=net_migration)) + 
  geom_rect(xmin = as.Date("2021/01/10"), xmax=as.Date("2021/02/24"), ymin=-Inf, ymax=Inf,
            fill = "#CCCCCC") +
  geom_rect(xmin = as.Date("2019/08/15"), xmax=as.Date("2019/10/15"), ymin=-Inf, ymax=Inf,
            fill = "#CCCCCC") + 
  geom_path() +
  ggtitle("Colombia") +
  xlab("Year") + ylab("Migrant Arrivals - Departures") +
  ylim(-40000,40000) + 
  geom_hline(yintercept = 0, linetype = "dashed") + 
  theme(
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8)) +
  annotate("text", x=as.Date("2019/01/15"), y=35000, label= "Baseline") +
  annotate("text", x=as.Date("2020/07/15"), y=35000, label= "Endline")


# Flows in Cali  ------------------------------------------------

# Load data - Cali
datasets_cali <- lapply(Sys.glob("CaliAirport*.csv"), read.csv)

# adjust data for 2020 
datasets_cali[[4]] <- datasets_cali[[4]]  %>% mutate(Enero=as.factor(Enero),
                                                     Febrero=as.factor(Febrero),
                                                     Marzo=as.factor(Marzo),
                                                     Abril=NA,
                                                     Mayo=as.factor(Mayo),
                                                     Junio=as.factor(Junio),
                                                     Julio=as.factor(Julio),
                                                     Agosto=as.factor(Agosto),
                                                     Septiembre=as.factor(Septiembre),
                                                     Octubre=as.factor(Octubre),
                                                     Noviembre=as.factor(Noviembre),
                                                     Diciembre=as.factor(Diciembre))

# Remove 2020 (it doesn't include April)
datasets2_cali <- foreach(i=1:4, b=2017:2020) %do% reshaping(datasets_cali[[i]], b)


# Specify dates for 2021 (there are 5 months)

flow2021_cali <- datasets_cali[[5]] %>% 
  pivot_longer(., names(.[-c(1)])) %>% 
  pivot_wider(., names_from = "Entrada.Salida", values_from = "value") %>% 
  rename(month=name, inflow=Entradas, outflow=Salidas) %>% 
  mutate(year=2021,
         inflow = as.character(inflow) %>% gsub(",","", .) %>% as.integer(.),
         outflow = as.character(outflow) %>% gsub(",","", .) %>% as.integer(.),
         net_migration = rowSums(cbind(inflow, outflow*-1), na.rm = TRUE),
         month_eng = seq(as.Date("2021/1/1"), as.Date("2021/5/30"), by = "month") %>% 
           format(., "%b")) 


datasets2_cali[[length(datasets2_cali)+1]] <- flow2021_cali

# create a dataframe
migrant_flow_cali <- data.table::rbindlist(datasets2_cali) %>% 
  mutate(period = seq(as.Date("2017/1/1"), as.Date("2021/5/30"), by="month"))

cali_flow <- ggplot(migrant_flow_cali, aes(x=period, y=net_migration)) + 
  geom_rect(xmin = as.Date("2021/01/10"), xmax=as.Date("2021/02/24"), ymin=-Inf, ymax=Inf,
            fill = "#CCCCCC") +
  geom_rect(xmin = as.Date("2019/08/15"), xmax=as.Date("2019/10/15"), ymin=-Inf, ymax=Inf,
            fill = "#CCCCCC") + 
  geom_path() +
  ggtitle("Cali") +
  xlab("Year") + ylab("") + 
  geom_hline(yintercept = 0, linetype = "dashed") + 
  theme(
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8)) 


# Flows in Cucuta ---------------------------------------------------------
datasets_cucuta <- lapply(Sys.glob("Cucuta*.csv"), read.csv)


# adjust data for 2020 
datasets_cucuta[[4]] <- datasets_cucuta[[4]]  %>% mutate(Enero=as.factor(Enero),
                                                         Febrero=as.factor(Febrero),
                                                         Marzo=as.factor(Marzo),
                                                         Abril=as.factor(Abril),
                                                         Mayo=as.factor(Mayo),
                                                         Junio=as.factor(Junio),
                                                         Julio=as.factor(Julio),
                                                         Agosto=as.factor(Agosto),
                                                         Septiembre=as.factor(Septiembre),
                                                         Octubre=as.factor(Octubre),
                                                         Noviembre=as.factor(Noviembre),
                                                         Diciembre=as.factor(Diciembre))

# Remove 2020 (it doesn't include April)
datasets2_cucuta <- foreach(i=1:4, b=2017:2020) %do% reshaping(datasets_cucuta[[i]], b)


flow2021_cucuta <- datasets_cucuta[[5]] %>% 
  pivot_longer(., names(.[-c(1)])) %>% 
  pivot_wider(., names_from = "Entrada.Salida", values_from = "value") %>% 
  rename(month=name, inflow=Entradas, outflow=Salidas) %>% 
  mutate(year=2021,
         inflow = as.character(inflow) %>% gsub(",","", .) %>% as.integer(.),
         outflow = as.character(outflow) %>% gsub(",","", .) %>% as.integer(.),
         net_migration = rowSums(cbind(inflow, outflow*-1), na.rm = TRUE),
         month_eng = seq(as.Date("2021/1/1"), as.Date("2021/5/30"), by = "month") %>% 
           format(., "%b")) 

datasets2_cucuta[[length(datasets2_cucuta)+1]] <- flow2021_cucuta

# create a dataframe
migrant_flow_cucuta <- data.table::rbindlist(datasets2_cucuta) %>% 
  mutate(period = seq(as.Date("2017/1/1"), as.Date("2021/5/30"), by="month"))

cucuta_flow <- ggplot(migrant_flow_cucuta, aes(x=period, y=net_migration)) + 
  geom_rect(xmin = as.Date("2021/01/10"), xmax=as.Date("2021/02/24"), ymin=-Inf, ymax=Inf,
            fill = "#CCCCCC") +
  geom_rect(xmin = as.Date("2019/08/15"), xmax=as.Date("2019/10/15"), ymin=-Inf, ymax=Inf,
            fill = "#CCCCCC") + 
  geom_path() +
  ggtitle("Cúcuta") +
  xlab("Year") + ylab("") + 
  geom_hline(yintercept = 0, linetype = "dashed") + 
  theme(
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8)) 

flowplot <- col_flow + cali_flow + cucuta_flow + plot_layout(ncol = 3, guides = "collect") +
  plot_annotation(title = "Venezuelan Migration Net Flows")

# plot
flowplot / covidplot 

@

%Venezuelan migrants were deeply affected by the lockdowns. Without access to daily informal work during the lockdown, thousands of migrants could not pay rent and buy food and were thus pressured to return to Venezuela.\footnote{\url{https://www.npr.org/2020/04/28/846945447/thousands-of-migrants-head-back-to-venezuela-to-flee-colombias-covid-19-lockdown}} In addition, media reports also pointed to increasing xenophobia against Venezuelans. For example, the \textit{Economist} reported, ``hundreds of Bogotanos have protested against plans to house migrants in sports facilities. Along the border, false reports of Venezuelans trying to break into gated neighborhoods, spread through Facebook, prompted police to deport some.''\footnote{\url{https://www.economist.com/the-americas/2020/04/30/colombia-cools-on-venezuelan-refugees}} Further, some mayors were exploiting the crisis and stoking anti-migrant sentiment to close shelters and bar migrants from entering their towns.\footnote{ibid} This suggests that we should find increased opposition to Venezuelan migrants. On the other hand, given the media's reporting bias, these incidences may not indicate the actual change in support. 

The start of the endline coincided with the peak of the second wave at the end of 2020.\footnote{In January 2021, when we fielded our survey, in the province in which Cali is located, there had been about  67,000 cases of COVID-19 and nearly 2,400 deaths, and the in the province in which C\'ucuta is located, there had been about 34,000 cases, and 1,400 deaths for 2021. There were about 8,000 active cases around Cali and 2,000 around C\'ucuta.}
Due to the surge at the end of 2020, our respondents were under quarantine orders during the entire period we fielded our survey.  Although the quarantine quickly brought the number of cases under control, respondents were experiencing the consequences of this second wave in their daily lives. Under half of our respondents had left home to go to work in the last month before we surveyed; fewer still had gone to school; when they did go out, they were largely going out to shop for what they needed or going outside to a park (see SI Section \ref{SIsubsec:lefthouse}).  Even later that year, the 2021 LAPOP nationally representative survey, fielded between March 19 and May 26, 2021, indicates that for the majority of Colombians (27.4\%), COVID-19 was still the most salient issue, ranking above typically important topics such as corruption (16.5\%).


\section*{Research Design: Panel Survey with Randomized Modules}

\subsection*{2019 pre-COVID Baseline Survey}

From August--October 2019, we surveyed Colombian citizens in Cali and C\'ucuta, two moderately populated cities with substantial concentrations of Venezuelan migrants. C\'ucuta is located at the Venezuelan border and therefore has absorbed the largest fraction of Venezuelan migrants, particularly poorer migrants without the resources to travel further. Cali is a coastal city with smaller concentrations of Venezuelans but large internally displaced populations.  

We surveyed about 500 Colombians in each city for a total of \Sexpr{nrow(df_col)} baseline respondents. A respected survey firm in Colombia (CNC) ran the face-to-face survey.\footnote{This study was approved under
%UCLA IRB \#19-001733-AM-00001 and UBC BREB \#H19-03288.
XXX IRB and YYY IRB (anonymized).
} 
We conducted a simple random household sample, choosing a random start location and using a skip rule. The survey lasted approximately 45 minutes, and respondents received roughly \$5 USD in compensation.

% descriptive results from Colombians baseline
In this pre-COVID survey, we asked about attitudes toward Venezuelan migrants (Migration Attitudes block). We found that 92\% of Colombians already believed that ``there are too many Venezuelans in the country,'' with 66\% supporting border closure. Back then, Colombians were primarily worried about the effects on Venezuelans on the job market (72\% feared Venezuelans would take jobs from Colombians) and on the ability of the government to provide services (78\%). They were also very concerned about how Venezuelans from a socialist regime might impact politics in a country where most voters support the center-right \citep{holland2024left}. Unlike in high-income country contexts, our Colombian respondents were relatively unconcerned about whether Venezuelans were high- or low-skill and unconcerned about the racial and cultural effects of these migrants. 

To confirm that there are strong cultural and ethnic ties between our respondents and Venezuelan migrants living nearby, in 2019 we also surveyed 1600 Venezuelans living in the study cities of Cali and Cúcuta. We measured demographic characteristics, including self-reported race, for all respondents. SI Section \ref{SIsubsec:racialcompare} shows practically the same distribution of self-reported race by nationality.

\subsection*{2021 Follow-up Survey}

We ran a follow-up survey from January--February 2021 by recontacting the 2019 respondents and supplementing them with a sample of new respondents. CNC used CATI to attempt to re-interview all participants from fall 2019. We recontacted 374 respondents (44\%), 211 in Cali and 163 in C\'ucuta.

%% attrition and equivalence
In Section \ref{SIsec:attrit} of the Supplementary Information (SI), we conduct equivalence tests to assess which demographic covariates differ between attrited and panel respondents and between the panel and new respondents.\footnote{We test whether the average values of pre-treatment variables are equivalent for attrited, panel, and new respondents. Current practice in the literature is to test for nonsignificant differences across groups of respondents. However, this approach conflates low statistical power with negligible differences across groups. We follow \citet{hartman2018equivalence} and set nonequivalence between groups as the null hypothesis. In this way, we test whether the difference between covariates in attrited and new respondents is inconsequential for our analysis.} 
Compared to attrited, panel respondents tend to be slightly more from Cali, more educated, Catholic, and ascribe to right-wing ideology,\footnote{Note that unlike in many Global North countries, right-wing ideology in Colombia does not typically mean anti-immigrant.} but are otherwise similar. We also recruited \Sexpr{nrow(col_new)} new participants to supplement our panel sample. These new respondents were chosen to match the demographics of those who attrited. We matched within each city on gender, ethnicity, age bracket, and SEL (household socio-economic status) quotas. SI Section \ref{SIsec:demog} reports the demographic characteristics for all respondents. 

In this endline survey, we presented two modules of survey questions. One module asked about the respondents and their families' exposure to the disease itself; the effects of the public health restrictions on their economic circumstances; their views of the government's response to the virus; and where they get information about the virus (COVID block). We used questions similar to those developed by the IPA RECOVR survey in Colombia. In the other module, we asked our Colombian respondents the same questions we asked in 2019 about their opinions on Venezuelans and their effects in Colombia (Migration Attitudes block). 

As a survey experimental component, we randomized whether the respondent received the COVID-19 block or the Migration Attitudes block first. We used the COVID-first to prime respondents to think about their COVID-19 exposure when answering the Migration Attitudes questions.\footnote{In our PAP, we presumed that receiving the COVID-19 module first may affect migration attitudes, but not the other way around since the COVID-19 module would only ask factual questions, not attitudinal. Nevertheless, we report the mostly null effects of the Migration Attitude block on assessments of government responses to COVID-19 in the SI.}  We note that this treatment is relatively subtle; COVID-19 was a daily issue for our respondents. It would have been challenging to design a treatment during this time that would have significantly increased the salience of COVID-19, and providing a treatment that downplayed its seriousness would have been unethical. Because we wanted to understand views \textit{during} the pandemic, we did not want to wait until after the pandemic had subsided for fears that the responses would have been a product of bias recall.   

\subsection*{Survey Measures and Hypotheses}

% survey questions here, in blocks
\begin{table}[t]
{\footnotesize
\begin{tabular}{|l|l|}
\hline
\textbf{COVID block} & \textbf{Migration Attitudes block} \\ \hline
Have you had COVID-19? & There are too many Venezuelans in Colombia \\ \hline
\begin{tabular}[c]{@{}l@{}}Has anyone in your family had COVID-19?\end{tabular} & \begin{tabular}[c]{@{}l@{}}Colombia should close its borders to \\ immigration immediately\end{tabular} \\ \hline
\begin{tabular}[c]{@{}l@{}}Do you know anyone who has had COVID-19?\end{tabular} & \begin{tabular}[c]{@{}l@{}}People should have the right to seek asylum,\\ including in Colombia\end{tabular} \\ \hline
\begin{tabular}[c]{@{}l@{}}Do you know anyone who has died from COVID-19?\end{tabular} & \begin{tabular}[c]{@{}l@{}}The international community is providing \\ enough aid for Colombia to handle the \\ Venezuelan migration situation\end{tabular} \\ \hline
\begin{tabular}[c]{@{}l@{}}What are your top 3 concerns \\ associated with COVID 19? \\ Economic / Mental health / Physical health / \\ Security / Border / Religious\end{tabular} & \begin{tabular}[c]{@{}l@{}}The Venezuelan migration has been\\ a good thing for the average Colombian\end{tabular} \\ \hline
\begin{tabular}[c]{@{}l@{}}Since March 2020, have you \\ Lost your job? / Lost wages? Spent savings? / \\ Borrowed money? / Relied on family and friends?\end{tabular} & \begin{tabular}[c]{@{}l@{}}The majority of migrants \& refugees \\ in Colombia have integrated successfully\end{tabular} \\ \hline
\begin{tabular}[c]{@{}l@{}}Have you received any govt assistance\\ that you did not before? If so, what?\end{tabular} & Venezuelans take Colombians' jobs \\ \hline
\begin{tabular}[c]{@{}l@{}}Where do you rate the national govt \\ COVID-19 response? (1-5)\end{tabular} & I compete with Venezuelans for work \\ \hline
\begin{tabular}[c]{@{}l@{}}How honest do you think the govt has been with \\ COVID-19 information? (1-5)\end{tabular} & \begin{tabular}[c]{@{}l@{}}Venezuelans living in Colombia are \\ deserving of our sympathy\end{tabular} \\ \hline
\begin{tabular}[c]{@{}l@{}}Where do you rate the local govt \\ COVID-19 response? (1-5)\end{tabular} & \begin{tabular}[c]{@{}l@{}}Venezuelans are more likely to spread \\ COVID-19 than Colombians\end{tabular} \\ \hline
\begin{tabular}[c]{@{}l@{}}Where do you rate the level of precautions that \\ Colombians are taking to face COVID? (1-5)\end{tabular} & \begin{tabular}[c]{@{}l@{}}Venezuelans are using scarce health resources \\ that Colombians need\end{tabular} \\ \hline
\begin{tabular}[c]{@{}l@{}}Which sources of information do you trust when \\ it comes to COVID-19 prevention?\end{tabular} & Venezuelans are essential workers during COVID-19 \\ \hline
If available, will you take the vaccine? & \begin{tabular}[c]{@{}l@{}}Venezuelans who are in Colombia now should \\ return to Venezuela until the emergency is over\end{tabular} \\ \hline
\end{tabular}
}
\caption{This table shows most of the survey questions (some paraphrased) for the two main survey blocks, which we randomized so the respondents who received the COVID block first were treated to think about COVID-19 before answering the Migration Attitudes block.}
\label{tab:survey}
\end{table}

Table \ref{tab:survey} shows most of the questions we asked in the two main blocks. For the Migration Attitudes block, they were read as Yes/No statements. Within them, we also randomized whether they were asked in the affirmative (``I compete with Venezuelans for work'') or the negative (``I do not compete with Venezuelans for work''). For ease of interpretation, we rescaled all outcome variables on migration attitudes so that more positive (negative) estimates correspond to more inclusive (anti-migrant) attitudes. For the full survey instrument in English, see SI Section \ref{SIsec:survey}.

COVID may have had a direct, indirect, or no effect on opinions toward Venezuelan migrants. Thus, we test the following main hypotheses:\footnote{In our PAP, we also included hypotheses about the security situation, contact with Venezuelans, and views of Venezuelans as essential workers \citep{adida2022refugees} to examine prominent alternative hypotheses. We found no support for these hypotheses; results are listed in the SI Section \ref{SIsec:het}.}

\begin{quote}
\setstretch{1.2}
\textbf{Null Hypothesis a}: For panel respondents, views towards Venezuelan migrants will be the \textit{same} during COVID compared to pre-COVID.\\
\textbf{Null Hypothesis b}: For both panel and cross-sectional respondents, Colombians' views towards Venezuelan migrants will be \textit{the same} when primed to think about COVID compared to not. 
\end{quote}

\begin{quote}
\setstretch{1.2}
\textbf{Direct Effect Hypothesis 1a}: For panel respondents, views towards Venezuelan migrants will be \textit{more negative} towards migrants during COVID compared to pre-COVID.\\
\textbf{Direct Effect Hypothesis 1b}: For both panel and cross-sectional respondents, Colombians' views towards Venezuelan migrants will be \textit{more negative} when primed to think about COVID compared to not. \\
\textbf{Direct Effect Hypothesis 2}: Respondents whose health or family's health have been affected by COVID will have \textit{more negative} views.\footnote{We are unable to conduct the DiD analysis for subgroups due to low power for the panelists.}
\end{quote}

\begin{quote}
\setstretch{1.2}
\textbf{Indirect Hypothesis 3}: Respondents who have experienced employment loss, income loss, or financial stress due to COVID will have \textit{more negative} views.\\
\end{quote}


\subsection*{Empirical Strategy}

We conduct the following analyses. First, we descriptively examine how respondents were affected by COVID-19 in the past year, how they evaluate the government's response, and where they get their information about COVID. Second, for the panel data of 374 respondents, our main two-period, two-group difference-in-differences (DiD) analysis compares pre- and post-COVID migration attitudes between the experimentally treated and control groups the treatment is whether the respondent received the COVID-first module on the survey. The equation we estimate is $$Y_{it} = \alpha_i + \lambda_t + \beta T_{it} + \gamma X_{it} + \epsilon_{it}$$ where $\alpha_i$ is a respondent fixed effect, $\lambda_t$ is a wave (2019 versus 2021) fixed effect, $T_{it}$ is an indicator for whether an observation is in the COVID-first module (0 for all 2019 wave observations, and 1 for the COVID-first observations in the 2021 wave), and $X_{it}$ is a vector of pre-treatment covariates for covariate adjustment. Standard errors are clustered at the respondent level. See SI Section S2 for power analysis.  

Third, we conduct a cross-sectional analysis of all 924 respondents at endline -- 374 panel respondents with the 550 new respondents, and we compare treated and control respondents. There, the equation we estimate is $$Y_i = \alpha + \beta T_i + \gamma (X_i - \bar{X}) + \lambda T_i(X_i - \bar{X}) + \epsilon_i$$ where $T_i$ indicates whether observation $i$ is in the COVID-first module group, $X_i$ is a vector of pre-treatment covariates, and $\bar{X}$ is a vector of the mean values of the pre-treatment covariates.

Fourth, we run heterogeneous subgroup analyses on the following variables -- a) whether respondents experienced unemployment, economic stress, or income loss; b) whether respondents' own or their families' health were affected by COVID-19; c) have security concerns; d) by city; e) have direct contact with Venezuelans; f) view Venezuelans as essential workers; and g) believed that the  government (national or local) responded appropriately to the pandemic.\footnote{We listed heterogeneous analyses by a), b), c), e), and f) in our PAP. Analyses d) and g) were requested by reviewers.}\textsuperscript{,}\footnote{We cannot conduct this analysis within the panel because the number of panel respondents is too low to examine subgroup effects.}

Finally, since our samples are not nationally representative, we first descriptively compare our respondents with recent nationally representative surveys conducted by IPA, Latinobarometer, and LAPOP regarding their demographic characteristics, pandemic experiences, and attitudes toward migrants in SI Section \ref{SIsec:compare}. We then re-weight all our analyses using weights derived from the 2021 LAPOP survey in SI Section \ref{SIsec:weights}, and results are substantively unchanged.


\section*{Results}

\subsection*{Experiences with COVID-19}

%%General experiences with COVID
<<covid_experiences, eval = TRUE, echo = FALSE, tidy=TRUE, fig.pos='t', fig.width = 11.5, fig.height = 8.5, out.width= "1\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, fig.cap="This figure shows the proportion of new (orange), panel (black), and all (blue) respondents who have been affected by COVID-19. All estimates include 95\\% CIs.">>=

# Bar plots for health outcomes (covid questions) - Cross-section ####
## cov_self
cov_self <- col_cross %>%
  group_by(panelist=as.numeric(as.character(panelist))) %>%
  summarise(mean_cov_self = mean(cov_self, na.rm = T),
            se_cov_self = sd(cov_self, na.rm = T)/sqrt(length(panelist))) %>% 
  rbind(c(2, mean(col_cross$cov_self, na.rm = T), 
          sd(col_cross$cov_self, na.rm = T)/sqrt(sum(!is.na(col_cross$cov_self))))) %>% 
  mutate(panelist = as.factor(panelist)) %>% 
  ggplot(., aes(x = panelist, y = mean_cov_self, fill = panelist)) +
  geom_bar(stat = "identity")  +
  geom_errorbar(aes(x=panelist, 
                    ymin=mean_cov_self-1.96*se_cov_self, 
                    ymax=mean_cov_self+1.96*se_cov_self), 
                width = 0.2) +
  scale_y_continuous(limits = c(0,1)) +
  ggtitle("Had COVID") +
  xlab("") +
  ylab("Proportion") +
  theme(
    axis.text.x = element_blank(),
    axis.ticks.x=element_blank(),
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    legend.title = element_blank(),
    legend.position = c(.2, .7)) + 
  scale_fill_manual(values = c("#D55E00","gray20","#0072B2"),
                    name="Group", labels=c("New","Panel","All"))

## cov_death
cov_death <- col_cross %>%
  group_by(panelist=as.numeric(as.character(panelist))) %>%
  summarise(mean_cov_death = mean(cov_death, na.rm = T),
            se_cov_death = sd(cov_death, na.rm = T)/sqrt(length(panelist))) %>% 
  rbind(c(2, mean(col_cross$cov_death, na.rm = T), 
          sd(col_cross$cov_death, na.rm = T)/sqrt(sum(!is.na(col_cross$cov_death))))) %>% 
  mutate(panelist = as.factor(panelist)) %>% 
  ggplot(., aes(x = panelist, y = mean_cov_death, fill = panelist)) +
  geom_bar(stat = "identity")  +
  geom_errorbar(aes(x=panelist, 
                    ymin=mean_cov_death-1.96*se_cov_death, 
                    ymax=mean_cov_death+1.96*se_cov_death), 
                width = 0.2) +
  ggtitle("Knows someone who\nhas died from COVID") +
  scale_y_continuous(limits = c(0,1)) +
  xlab("") +
  ylab("") +
  theme(
    axis.text.x = element_blank(),
    axis.ticks.x=element_blank(),
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    legend.position = "none") + 
  scale_fill_manual(values = c("#D55E00","gray20","#0072B2"),
                    name="Group", labels=c("New","Panel","All"))


## cov_family
cov_family <- col_cross %>%
  group_by(panelist=as.numeric(as.character(panelist))) %>%
  summarise(mean_cov_family = mean(cov_family, na.rm = T),
            se_cov_family = sd(cov_family, na.rm = T)/sqrt(length(panelist))) %>%
  rbind(c(2, mean(col_cross$cov_family, na.rm = T), 
          sd(col_cross$cov_family, na.rm = T)/sqrt(sum(!is.na(col_cross$cov_family))))) %>% 
  mutate(panelist = as.factor(panelist)) %>% 
  ggplot(., aes(x = panelist, y = mean_cov_family, fill = panelist)) +
  geom_bar(stat = "identity")  +
  geom_errorbar(aes(x=panelist, 
                    ymin=mean_cov_family-1.96*se_cov_family, 
                    ymax=mean_cov_family+1.96*se_cov_family), 
                width = 0.2) +
  scale_y_continuous(limits = c(0,1)) +
  ggtitle("Family member had COVID") +
  xlab("") +
  ylab("") +
  theme(
    axis.text.x = element_blank(),
    axis.ticks.x=element_blank(),
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    legend.position = "none") + 
  scale_fill_manual(values = c("#D55E00","gray20","#0072B2"),
                    name="Group", labels=c("New","Panel","All"))

## cov_anyone
cov_anyone <- col_cross %>%
  group_by(panelist=as.numeric(as.character(panelist))) %>%
  summarise(mean_cov_anyone = mean(cov_anyone, na.rm = T),
            se_cov_anyone = sd(cov_anyone, na.rm = T)/sqrt(length(panelist))) %>% 
  rbind(c(2, mean(col_cross$cov_anyone, na.rm = T), 
          sd(col_cross$cov_anyone, na.rm = T)/sqrt(sum(!is.na(col_cross$cov_anyone))))) %>% 
  mutate(panelist = as.factor(panelist)) %>% 
  ggplot(., aes(x = panelist, y = mean_cov_anyone, fill = panelist)) +
  geom_bar(stat = "identity")  +
  scale_y_continuous(limits = c(0,1)) +
  geom_errorbar(aes(x=panelist, 
                    ymin=mean_cov_anyone-1.96*se_cov_anyone, 
                    ymax=mean_cov_anyone+1.96*se_cov_anyone), 
                width = 0.2) +
  ggtitle("Knows someone\nwho had COVID") +
  xlab("") +
  ylab("") +
  theme(
    axis.text.x = element_blank(),
    axis.ticks.x=element_blank(),
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    legend.position = "none") + 
   scale_fill_manual(values = c("#D55E00","gray20","#0072B2"),
                    name="Group", labels=c("New","Panel","All"))

## Job loss
cov_lostjob <- col_cross %>%
  group_by(panelist=as.numeric(as.character(panelist))) %>%
  summarise(mean_cov_lostjob = mean(cov_lostjob, na.rm = T),
            se_cov_lostjob = sd(cov_lostjob, na.rm = T)/sqrt(length(panelist))) %>% 
  rbind(c(2, mean(col_cross$cov_lostjob, na.rm = T), 
          sd(col_cross$cov_lostjob, na.rm = T)/sqrt(sum(!is.na(col_cross$cov_lostjob))))) %>% 
  mutate(panelist = as.factor(panelist)) %>% 
  ggplot(., aes(x = panelist, y = mean_cov_lostjob, fill = panelist)) +
  geom_bar(stat = "identity")  +
  geom_errorbar(aes(x=panelist, 
                    ymin=mean_cov_lostjob-1.96*se_cov_lostjob, 
                    ymax=mean_cov_lostjob+1.96*se_cov_lostjob), 
                width = 0.2) +
  ggtitle("Lost job") +
  scale_y_continuous(limits = c(0,1)) +
  xlab("") +
  ylab("Proportion") +
  theme(
    axis.text.x = element_blank(),
    axis.ticks.x=element_blank(),
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    legend.position = "none") + 
  scale_fill_manual(values = c("#D55E00","gray20","#0072B2"),
                    name="Group", labels=c("New","Panel","All"))

econ_stress <- col_cross %>%
  group_by(panelist=as.numeric(as.character(panelist))) %>%
  summarise(mean_econ_stress = mean(economic_stress, na.rm = T),
            se_econ_stress = sd(economic_stress, na.rm = T)/sqrt(length(panelist))) %>% 
  rbind(c(2, mean(col_cross$economic_stress, na.rm = T), 
          sd(col_cross$economic_stress, na.rm = T)/sqrt(sum(!is.na(col_cross$economic_stress))))) %>% 
  mutate(panelist = as.factor(panelist)) %>% 
  ggplot(., aes(x = panelist, y = mean_econ_stress, fill = panelist)) +
  scale_y_continuous(limits = c(0,1)) +
  geom_bar(stat = "identity")  +
  geom_errorbar(aes(x=panelist, 
                    ymin=mean_econ_stress-1.96*se_econ_stress, 
                    ymax=mean_econ_stress+1.96*se_econ_stress),
                width = 0.2) +
  ggtitle("Spent savings, borrowed,\nor had family assistance") +
  xlab("") +
  ylab("") +
  theme(
    axis.text.x = element_blank(),
    axis.ticks.x=element_blank(),
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    legend.position = "none") + 
  scale_fill_manual(values = c("#D55E00","gray20","#0072B2"),
                    name="Group", labels=c("New","Panel","All"))

# income loss
income_loss <- col_cross %>%
  group_by(panelist=as.numeric(as.character(panelist))) %>%
  summarise(mean_income_loss = mean(income_loss, na.rm = T),
            se_income_loss = sd(income_loss, na.rm = T)/sqrt(length(panelist))) %>% 
  rbind(c(2, mean(col_cross$income_loss, na.rm = T), 
          sd(col_cross$income_loss, na.rm = T)/sqrt(sum(!is.na(col_cross$income_loss))))) %>% 
  mutate(panelist = as.factor(panelist)) %>% 
  ggplot(., aes(x = panelist, y = mean_income_loss, fill = panelist)) +
  scale_y_continuous(limits = c(0,1)) +
  geom_bar(stat = "identity")  +
  geom_errorbar(aes(x=panelist, 
                    ymin=mean_income_loss-1.96*se_income_loss, 
                    ymax=mean_income_loss+1.96*se_income_loss),
                width = 0.2) +
  ggtitle("Reduced hours or wages") +
  xlab("") +
  ylab("") +
  theme(
    axis.text.x = element_blank(),
    axis.ticks.x=element_blank(),
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    legend.position = "none") + 
  scale_fill_manual(values = c("#D55E00","gray20","#0072B2"),
                    name="Group", labels=c("New","Panel","All"))

# govt assist
cov_assist_dummy <- col_cross %>%
  group_by(panelist=as.numeric(as.character(panelist))) %>%
  summarise(mean_cov_assistance_d = mean(cov_assistance_dummy, na.rm = T),
            se_cov_assistance_d = sd(cov_assistance_dummy, na.rm = T)/sqrt(length(panelist))) %>%
  rbind(c(2, mean(col_cross$cov_assistance_dummy, na.rm = T), 
          sd(col_cross$cov_assistance_dummy, na.rm = T)/sqrt(sum(!is.na(col_cross$cov_assistance_dummy))))) %>% 
  mutate(panelist = as.factor(panelist)) %>% 
  ggplot(., aes(x = panelist, y = mean_cov_assistance_d, fill = panelist)) +
  scale_y_continuous(limits = c(0,1)) +
  geom_bar(stat = "identity")  +
  geom_errorbar(aes(x=panelist, 
                    ymin=mean_cov_assistance_d-1.96*se_cov_assistance_d, 
                    ymax=mean_cov_assistance_d+1.96*se_cov_assistance_d), 
                width = 0.2) +
  ggtitle("Received govt assistance") +
  xlab("") +
  ylab("") +
  theme(
    axis.text.x = element_blank(),
    axis.ticks.x=element_blank(),
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    legend.position = "none") + 
  scale_fill_manual(values = c("#D55E00","gray20","#0072B2"),
                    name="Group", labels=c("New","Panel","All"))

# Info social media
cov_info_social_media <- col_cross %>%
  group_by(panelist=as.numeric(as.character(panelist))) %>%
  summarise(mean_cov_info_sc = mean(cov_info_social_media, na.rm = T),
            se_cov_info_sc = sd(cov_info_social_media, na.rm = T)/sqrt(length(panelist))) %>%
  rbind(c(2, mean(col_cross$cov_info_social_media, na.rm = T), 
          sd(col_cross$cov_info_social_media, na.rm = T)/sqrt(sum(!is.na(col_cross$cov_info_social_media))))) %>% 
  mutate(panelist = as.factor(panelist)) %>% 
  ggplot(., aes(x = panelist, y = mean_cov_info_sc, fill = panelist)) +
  scale_y_continuous(limits = c(0,1)) +
  geom_bar(stat = "identity")  +
  geom_errorbar(aes(x=panelist, 
                    ymin=mean_cov_info_sc-1.96*se_cov_info_sc, 
                    ymax=mean_cov_info_sc+1.96*se_cov_info_sc), 
                width = 0.2) +
  ggtitle("Info from Social Media") +
  xlab("") +
  ylab("") +
  theme(
    axis.text.x = element_blank(),
    axis.ticks.x=element_blank(),
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    legend.position = "none") + 
  scale_fill_manual(values = c("#D55E00","gray20","#0072B2"),
                    name="Group", labels=c("New","Panel","All"))

# Info private
cov_info_private <- col_cross %>%
  group_by(panelist=as.numeric(as.character(panelist))) %>%
  summarise(mean_cov_info_private = mean(cov_info_private, na.rm = T),
            se_cov_info_private = sd(cov_info_private, na.rm = T)/sqrt(length(panelist))) %>%
  rbind(c(2, mean(col_cross$cov_info_private, na.rm = T), 
          sd(col_cross$cov_info_private, na.rm = T)/sqrt(sum(!is.na(col_cross$cov_info_private))))) %>% 
  mutate(panelist = as.factor(panelist)) %>% 
  ggplot(., aes(x = panelist, y = mean_cov_info_private, fill = panelist)) +
  scale_y_continuous(limits = c(0,1)) +
  geom_bar(stat = "identity")  +
  geom_errorbar(aes(x=panelist, 
                    ymin=mean_cov_info_private-1.96*se_cov_info_private, 
                    ymax=mean_cov_info_private+1.96*se_cov_info_private), 
                width = 0.2) +
  ggtitle("Info from Private Media") +
  xlab("") +
  ylab("Proportion") +
  theme(
    axis.text.x = element_blank(),
    axis.ticks.x=element_blank(),
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    legend.position = "none") + 
  scale_fill_manual(values = c("#D55E00","gray20","#0072B2"),
                    name="Group", labels=c("New","Panel","All"))
  
#All group
col_cross_all <- col_cross
col_cross_all$panelist <- 2
col_cross_all <- rbind(col_cross, col_cross_all)

# nat gov
cov_natgov <- ggplot(col_cross_all[is.na(col_cross_all$cov_natgov)==F,], 
                     aes(x=as.factor(cov_natgov), fill=as.factor(as.character(panelist)))) + 
  geom_bar(aes(y = ..prop.., group=panelist), position = "dodge") +
  ggtitle("Rate Natl Govt response") +
  scale_x_discrete(labels = c('Not sufficient','','Appropriate','','Too extreme')) +
  scale_y_continuous(limits = c(0,1)) +
  xlab("") +
  ylab("") +
  theme(
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    legend.position = "none") + 
  scale_fill_manual(values = c("#D55E00","gray20","#0072B2"),
                    name="Group", labels=c("New","Panel","All"))

# precautions
cov_public <- ggplot(col_cross_all[is.na(col_cross_all$cov_public)==F,], 
                     aes(x=as.factor(cov_public), fill=as.factor(as.character(panelist)))) + 
  geom_bar(aes(y = ..prop.., group=panelist), position = "dodge") +
  ggtitle("Rate Public Precautions") +
  scale_x_discrete(labels = c('Not sufficient','','Appropriate','','Too extreme')) +
  scale_y_continuous(limits = c(0,1)) +
  xlab("") +
  ylab("") +
  theme(
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    legend.position = "none") + 
  scale_fill_manual(values = c("#D55E00","gray20","#0072B2"),
                    name="Group", labels=c("New","Panel","All"))


# plot
cov_self + cov_family + cov_anyone + cov_death + 
  cov_lostjob + income_loss + econ_stress + cov_assist_dummy + 
  cov_info_private + cov_info_social_media + cov_natgov + cov_public + plot_layout(ncol = 4)

@

In Figure \ref{fig:covid_experiences}, we summarize our respondents' experiences with COVID-19. Across the groups (new, panel, all), the experiences are similar. While only \Sexpr{mean(col_cross$cov_self, na.rm = T)*100}\% of respondents reported having had COVID, \Sexpr{mean(col_cross$cov_family, na.rm = T)*100}\% had a family member who had COVID, and the vast majority at \Sexpr{mean(col_cross$cov_anyone, na.rm = T)*100}\% knew someone with COVID and \Sexpr{mean(col_cross$cov_death, na.rm = T)*100}\% knew someone who had died from COVID. Thus, COVID was a serious health concern in Colombia as it was elsewhere.  
COVID was perhaps a more severe economic threat for most Colombians. Half of our respondents lost their jobs, and \Sexpr{mean(col_cross$income_loss, na.rm = T)*100}\% reported their hours or wages reduced. About \Sexpr{mean(col_cross$economic_stress, na.rm = T)*100}\% had to spend their savings, borrow money, or get assistance from their family/friends to cover living expenses, and \Sexpr{mean(col_cross$cov_assistance_dummy, na.rm = T)*100}\% reported receiving government assistance due to the pandemic.
%The two (out of 13) most popular sources for information on COVID were private media (\Sexpr{mean(col_cross$cov_info_private, na.rm = T)*100}\%) and social media (\Sexpr{mean(col_cross$cov_info_social_media, na.rm = T)*100}\%). Unlike in the US, most Colombians thought the government's response was either appropriate or insufficient, with few saying it was too extreme. Responses to rating the local government's response and government honesty about COVID-19 were similar. 

\subsection*{Pre-Post Differences for Panel Respondents}

<<mig_gen_prepost, eval = TRUE, echo = FALSE, tidy=TRUE, fig.pos = "t", fig.width = 10.5, fig.height = 8.5, out.width= ".98\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, fig.cap="For each set of outcomes, the top plot shows over time means for all respondents regardless of the survey treatment status. The bottom plot shows the pre-post estimate controlling for demographic variables for all respondents. All estimates include 95\\% CIs.">>=

##### PLOT 1
outcomes <- c("mig_gen_country", "mig_gen_border", "mig_gen_city", "mig_gen_oth_country")

outcomes_names <- c(
                    "mig_gen_country" = "Not too many Vens",
                    "mig_gen_border" = "Border should be open",
                    "mig_gen_city" = "Our city should host Vens",
                    "mig_gen_oth_country" = "Right to seek asylum"
                    )

## Estimate over-time means ##
overtime_means <- col_long %>%
  dplyr::select(!!outcomes, period) %>%
  pivot_longer(-period, names_to = "outcome_var",
               values_to = "value") %>%
  group_by(outcome_var, period) %>%
  do({
    lm_robust(value~1, data = .) %>% tidy()
  }) %>%
  mutate(est = "Overall")

#plot 
plot_overtimeA <- ggplot(overtime_means, aes(period, estimate, group = as.factor(est))) + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = 0) +
  geom_line(lty = "dashed") + 
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "", y = "Share of\nRespondents") + 
  ylim(0,1) +
  yy_theme() +
  ggtitle("MIGRATION OPENNESS ATTITUDES")


## Regression analysis ##

## Controls
controls <- c("age", 
              "male",
              "city_num", 
              "race_mestizo", 
              "education", 
              "kids", 
              "marriage", 
              "religion_cath",
              "religion_evan",
              "religiosity", 
              "wealth_index")

controls <- paste0(controls, collapse = "+")

## Formula
form_main <- paste0("%s ~ period + ", controls, "| 0 | 0 | name")
form_did <- paste0("%s ~ period_x_treatment + ", controls, "| covid_first + period | 0 | name")

## --------
## Estimate
## --------
covid_did_out1 <- foreach(i = 1:length(outcomes), .combine = "rbind") %do% {
  
  ## Format formulas
  outcome <- outcomes[i]
  form_main_out <- sprintf(form_main, outcome)
  form_did_out <- sprintf(form_did, outcome)
  
  ## Regressions
  reg_main <- felm(as.formula(form_main_out), col_long)
  reg_did <- felm(as.formula(form_did_out), col_long)
  
  ## Tidy and return
  out <- bind_rows(
    broom::tidy(reg_main, conf.int = TRUE) %>% filter(term == "periodendline") %>% 
      mutate(outcome = outcome, model = "prepost_diff"),
    broom::tidy(reg_did, conf.int = TRUE) %>% filter(term == "period_x_treatment") 
    %>% mutate(outcome = outcome, model = "diff_in-diff")
  )
  
  return(out)
  
}

plot_didresultsA <- ggplot(covid_did_out1[covid_did_out1$model=="prepost_diff",],
                            aes(x = reorder(term, -desc(term)), y = estimate)) + 
  geom_hline(aes(yintercept = 0), lty = "dashed", color = "gray60") + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = .15) + 
  geom_label(aes(label = gsub("0\\.", "\\.", round(estimate, 3))), size = 2.5) + 
  facet_wrap(~outcome, labeller = as_labeller(outcomes_names), nrow = 1) +
  ylim(-.2,.2) +
  labs(x = "Treatment", 
       y = "Average Treatment Effects") +
  scale_x_discrete(labels=c("Endline")) +
  coord_flip() +
  yy_theme() +
  theme(strip.text = element_blank())


##### PLOT 2
outcomes <- c("labor_jobs1", "labor_jobs2", "labor_compete1", "labor_compete2")

outcomes_names <- c(
                    "labor_jobs1" = "Vens do not take Cols' jobs",
                    "labor_jobs2" = "Vens do not take desirable jobs",
                    "labor_compete1" = "I do not compete w/ Vens",
                    "labor_compete2" = "Cols in my city\ndo not compete w/ Vens"
                    )

## Estimate over-time means ##
overtime_means <- col_long %>%
  dplyr::select(!!outcomes, period) %>%
  pivot_longer(-period, names_to = "outcome_var",
               values_to = "value") %>%
  group_by(outcome_var, period) %>%
  do({
    lm_robust(value~1, data = .) %>% tidy()
  }) %>%
  mutate(est = "Overall")

#plot 
plot_overtimeB <- ggplot(overtime_means, aes(period, estimate, group = as.factor(est))) + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = 0) +
  geom_line(lty = "dashed") + 
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "", y = "Share of\nRespondents") + 
  ylim(0,1) +
  yy_theme() +
  ggtitle("WHETHER MIGRANTS COMPETE FOR EMPLOYMENT")

## Regression analysis ##

## --------
## Estimate
## --------
covid_did_out2 <- foreach(i = 1:length(outcomes), .combine = "rbind") %do% {
  
  ## Format formulas
  outcome <- outcomes[i]
  form_main_out <- sprintf(form_main, outcome)
  form_did_out <- sprintf(form_did, outcome)
  
  ## Regressions
  reg_main <- felm(as.formula(form_main_out), col_long)
  reg_did <- felm(as.formula(form_did_out), col_long)
  
  ## Tidy and return
  out <- bind_rows(
    tidy(reg_main, conf.int = TRUE) %>% filter(term == "periodendline") %>% mutate(outcome = outcome, model = "prepost_diff"),
    tidy(reg_did, conf.int = TRUE) %>% filter(term == "period_x_treatment") %>% mutate(outcome = outcome, model = "diff_in-diff")
  )
  
  return(out)
  
}

plot_didresultsB <- ggplot(covid_did_out2[covid_did_out2$model=="prepost_diff",],
                            aes(x = reorder(term, -desc(term)), y = estimate)) + 
  geom_hline(aes(yintercept = 0), lty = "dashed", color = "gray60") + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = .15) + 
  geom_label(aes(label = gsub("0\\.", "\\.", round(estimate, 3))), size = 2.5) + 
  facet_wrap(~outcome, labeller = as_labeller(outcomes_names), nrow = 1) +
  ylim(-.2,.2) +
  labs(x = "Treatment", 
       y = "Average Treatment Effects") +
  scale_x_discrete(labels=c("Endline")) +
  coord_flip() +
  yy_theme() +
  theme(strip.text = element_blank())

# plot 
(plot_overtimeA / plot_didresultsA / 
    plot_overtimeB / plot_didresultsB) +
  plot_layout(heights = c(1, 1, 1, 1))


@

Figure \ref{fig:mig_gen_prepost} shows pre- and post-pandemic differences across all panel respondents. For each group of outcomes---(1) migration openness and (2) whether migrants compete for employment---the top panel presents the 2019 and 2021 means, and the bottom panel displays the post-pre estimated differences controlling for demographic variables. In SI Section \ref{SIsec:full}, we show results for the two additional groups of outcomes---(3) whether migrants bring benefits and (4) whether migrants can integrate.

Notably, there is an increase in the demand to keep the border closed after the pandemic, (support for opening the border decreased by \Sexpr{-covid_did_out1[covid_did_out1$model == "prepost_diff" & covid_did_out1$outcome == "mig_gen_border",]$estimate*100} percentage points (pp)). Nevertheless,  
general attitudes about openness towards Venezuelans remained relatively stable or even increased.  
For example, more panel respondents post-pandemic said that there were not too many Venezuelans in their country (\Sexpr{covid_did_out1[covid_did_out1$model == "prepost_diff" & covid_did_out1$outcome == "mig_gen_country",]$estimate*100} pp); that Venezuelans did not take Colombians' jobs  (\Sexpr{covid_did_out2[covid_did_out2$model == "prepost_diff" & covid_did_out2$outcome == "labor_jobs1",]$estimate*100} pp) and that they did not take the most desirable jobs  (\Sexpr{covid_did_out2[covid_did_out2$model == "prepost_diff" & covid_did_out2$outcome == "labor_jobs2",]$estimate*100} pp). Although not statistically significant, the pattern of positive attitudinal shift is also present for the other two economic outcomes. 


\subsection*{Diff-in-Diff Estimates for Panel Respondents}

Next, Figure \ref{fig:mig_gen_did} reports DiD results for panel respondents, this time separated by survey treatment status. The orange lines displaying the COVID-First treatment group and blue lines indicating the control group. The bottom panel displays the DiD estimates of the COVID-First treatment. 

<<mig_gen_did, eval = TRUE, echo = FALSE, tidy=TRUE, fig.pos = "t", fig.width = 10.5, fig.height = 8.5, out.width= ".98\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, fig.cap="For each set of outcomes, the top plot shows over time means by COVID-First treatment (orange) vs. control (blue). The bottom plot shows the Diff-in-Diff estimate of COVID-First interacted with period controlling for demographic variables. All estimates include 95\\% CIs.">>=

##### PLOT 1
outcomes <- c("mig_gen_country", "mig_gen_border", "mig_gen_city", "mig_gen_oth_country")

outcomes_names <- c(
                    "mig_gen_country" = "Not too many Vens",
                    "mig_gen_border" = "Border should be open",
                    "mig_gen_city" = "Our city should host Vens",
                    "mig_gen_oth_country" = "Right to seek asylum"
                    )

## Estimate over-time means ##
treatmentstatus_means <- col_long %>%
  dplyr::select(!!outcomes, period, covid_first) %>%
  pivot_longer(-c(period, covid_first), 
               names_to = "outcome_var", values_to = "value") %>%
  group_by(outcome_var, period, covid_first) %>%
  do({
    lm_robust(value~1, data = .) %>% broom::tidy()
  }) %>%
  mutate(est = "By Treatment Status")

mean_plot_df <- bind_rows(overtime_means, treatmentstatus_means)

#plot 
plot_overtime <- ggplot(treatmentstatus_means, aes(period, estimate, 
                                              group = as.factor(covid_first), 
                         colour = as.factor(covid_first))) + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), 
                width = 0, position = position_dodge(.4)) +
  geom_line(position = position_dodge(.4), lty = "dashed") + 
  ylim(0,1) +
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "", y = "Share of\nRespondents") + 
  scale_colour_manual(values = c("#0072B2","#D55E00")) + 
  yy_theme() +
  ggtitle("MIGRATION OPENNESS ATTITUDES")

dat_text <- data.frame(
  label = c("COVID-First"),
  outcome_var   = c("mig_gen_border"),
  covid_first = c(0,1)
)

plot_overtime1 <- plot_overtime + geom_text(
  data    = dat_text,
  mapping = aes(x = 1.3, y = .5, label = label)
)


#plot 
plot_didresults1 <- ggplot(covid_did_out1[covid_did_out1$model=="diff_in-diff",],
                            aes(x = reorder(term, -desc(term)), y = estimate)) + 
  geom_hline(aes(yintercept = 0), lty = "dashed", color = "gray60") + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = .15) + 
  geom_label(aes(label = gsub("0\\.", "\\.", round(estimate, 3))), size = 2.5) + 
  facet_wrap(~outcome, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "Treatment", 
       y = "Average Treatment Effects") +
  scale_x_discrete(labels=c("COVID-First x\nEndline")) +
  coord_flip() +
  yy_theme() +
  theme(strip.text = element_blank())


##### PLOT 2
outcomes <- c("labor_jobs1", "labor_jobs2", "labor_compete1", "labor_compete2")

outcomes_names <- c(
                    "labor_jobs1" = "Vens do not take Cols' jobs",
                    "labor_jobs2" = "Vens do not take desirable jobs",
                    "labor_compete1" = "I do not compete w/ Vens",
                    "labor_compete2" = "Cols in my city\ndo not compete w/ Vens"
                    )

## Estimate over-time means ##
treatmentstatus_means <- col_long %>%
  dplyr::select(!!outcomes, period, covid_first) %>%
  pivot_longer(-c(period, covid_first), 
               names_to = "outcome_var", values_to = "value") %>%
  group_by(outcome_var, period, covid_first) %>%
  do({
    lm_robust(value~1, data = .) %>% broom::tidy()
  }) %>%
  mutate(est = "By Treatment Status")

mean_plot_df <- bind_rows(overtime_means, treatmentstatus_means)

#plot 
plot_overtime <- ggplot(treatmentstatus_means, aes(period, estimate, 
                                              group = as.factor(covid_first), 
                         colour = as.factor(covid_first))) + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), 
                width = 0, position = position_dodge(.4)) +
  geom_line(position = position_dodge(.4), lty = "dashed") + 
  ylim(0,1) +
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "", y = "Share of\nRespondents") + 
  scale_colour_manual(values = c("#0072B2","#D55E00")) + 
  yy_theme() +
  ggtitle("WHETHER MIGRANTS COMPETE FOR EMPLOYMENT")

dat_text <- data.frame(
  label = c("COVID-First"),
  outcome_var   = c("labor_compete1"),
  covid_first = c(0,1)
)

plot_overtime2 <- plot_overtime + geom_text(
  data    = dat_text,
  mapping = aes(x = 1.3, y = .4, label = label)
)


#plot 
plot_didresults2 <- ggplot(covid_did_out2[covid_did_out2$model=="diff_in-diff",],
                            aes(x = reorder(term, -desc(term)), y = estimate)) + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = .15) + 
  geom_label(aes(label = gsub("0\\.", "\\.", round(estimate, 3))), size = 2.5) + 
  geom_hline(aes(yintercept = 0), lty = "dashed", color = "gray30") + 
  facet_wrap(~outcome, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "Treatment", 
       y = "Average Treatment Effects") +
  scale_x_discrete(labels=c("COVID-First x\nEndline")) +
  coord_flip() +
  yy_theme()  +
  theme(strip.text = element_blank())


##### Plot 3
outcomes <- c("fisc_service", "fisc_aid", 
              "socio_gen", "sec_conflict")

outcomes_names <- c(
                    "fisc_service" = "W/ Vens easier to access services",
                    "fisc_aid" = "Enough aid to handle migrants",
                    "socio_gen" = "Vens presence benefits Cols",
                    "sec_conflict" = "Vens presence mitigates conflict"
                    )

## Estimate over-time means ##
overtime_means <- col_long %>%
  dplyr::select(!!outcomes, period) %>%
  pivot_longer(-period, names_to = "outcome_var",
               values_to = "value") %>%
  group_by(outcome_var, period) %>%
  do({
    lm_robust(value~1, data = .) %>% broom::tidy()
  }) %>%
  mutate(est = "Overall")

treatmentstatus_means <- col_long %>%
  dplyr::select(!!outcomes, period, covid_first) %>%
  pivot_longer(-c(period, covid_first), 
               names_to = "outcome_var", values_to = "value") %>%
  group_by(outcome_var, period, covid_first) %>%
  do({
    lm_robust(value~1, data = .) %>% tidy()
  }) %>%
  mutate(est = "By Treatment Status")

mean_plot_df <- bind_rows(overtime_means, treatmentstatus_means)

#plot 
plot_overtime <- ggplot(treatmentstatus_means, aes(period, estimate, 
                                              group = as.factor(covid_first), 
                         colour = as.factor(covid_first))) + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), 
                width = 0, position = position_dodge(.4)) +
  geom_line(position = position_dodge(.4), lty = "dashed") + 
  ylim(0,1) +
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "", y = "Share of\nRespondents") + 
  scale_colour_manual(values = c("#0072B2","#D55E00")) + 
  yy_theme() +
  ggtitle("WHETHER MIGRANTS BRING BENEFITS")

dat_text <- data.frame(
  label = c("COVID-First"),
  outcome_var   = c("fisc_aid"),
  covid_first = c(0,1)
)

plot_overtime3 <- plot_overtime + geom_text(
  data    = dat_text,
  mapping = aes(x = 1.3, y = .5, label = label)
)

## Regression analysis ##

## --------
## Estimate
## --------
covid_did_out3 <- foreach(i = 1:length(outcomes), .combine = "rbind") %do% {
  
  ## Format formulas
  outcome <- outcomes[i]
  form_main_out <- sprintf(form_main, outcome)
  form_did_out <- sprintf(form_did, outcome)
  
  ## Regressions
  reg_main <- felm(as.formula(form_main_out), col_long)
  reg_did <- felm(as.formula(form_did_out), col_long)
  
  ## Tidy and return
  out <- bind_rows(
    broom::tidy(reg_main, conf.int = TRUE) %>% filter(term == "periodendline") %>% mutate(outcome = outcome, model = "prepost_diff"),
    broom::tidy(reg_did, conf.int = TRUE) %>% filter(term == "period_x_treatment") %>% mutate(outcome = outcome, model = "diff_in-diff")
  )
  
  return(out)
  
}

#plot 
plot_didresults3 <- ggplot(covid_did_out3,
                            aes(x = reorder(term, -desc(term)), y = estimate)) + 
  geom_hline(aes(yintercept = 0), lty = "dashed", color = "gray60") + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = .15) + 
  geom_label(aes(label = gsub("0\\.", "\\.", round(estimate, 3))), size = 2.5) + 
  facet_wrap(~outcome, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "Treatment", 
       y = "Average Treatment Effects") +
  scale_x_discrete(labels=c("COVID-First x\nEndline", "Endline")) +
  coord_flip() +
  yy_theme()  +
  theme(strip.text = element_blank())


##### PLOT 4
outcomes <- c("socio_work", "socio_integrate", 
              "pol_left", "hist_culture")

outcomes_names <- c(
                    "socio_work" = "Vens are hardworking",
                    "socio_integrate" = "Vens integrate successfully",
                    "pol_left" = "Vens are leftist",
                    "hist_culture" = "Cols and Vens share cultural ties"
                    )

## Estimate over-time means ##
overtime_means <- col_long %>%
  dplyr::select(!!outcomes, period) %>%
  pivot_longer(-period, names_to = "outcome_var",
               values_to = "value") %>%
  group_by(outcome_var, period) %>%
  do({
    lm_robust(value~1, data = .) %>% broom::tidy()
  }) %>%
  mutate(est = "Overall")

treatmentstatus_means <- col_long %>%
  dplyr::select(!!outcomes, period, covid_first) %>%
  pivot_longer(-c(period, covid_first), 
               names_to = "outcome_var", values_to = "value") %>%
  group_by(outcome_var, period, covid_first) %>%
  do({
    lm_robust(value~1, data = .) %>% broom::tidy()
  }) %>%
  mutate(est = "By Treatment Status")

mean_plot_df <- bind_rows(overtime_means, treatmentstatus_means)

#plot 
plot_overtime <- ggplot(treatmentstatus_means, aes(period, estimate, 
                                              group = as.factor(covid_first), 
                         colour = as.factor(covid_first))) + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), 
                width = 0, position = position_dodge(.4)) +
  geom_line(position = position_dodge(.4), lty = "dashed") + 
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "", y = "Share of\nRespondents") + 
  scale_colour_manual(values = c("#0072B2","#D55E00")) + 
  yy_theme() +
  ggtitle("WHETHER MIGRANTS CAN INTEGRATE")

dat_text <- data.frame(
  label = c("COVID-First"),
  outcome_var   = c("hist_culture"),
  covid_first = c(0,1)
)

plot_overtime4 <- plot_overtime + geom_text(
  data    = dat_text,
  mapping = aes(x = 1.3, y = .5, label = label)
)

## Regression analysis ##

## --------
## Estimate
## --------
covid_did_out4 <- foreach(i = 1:length(outcomes), .combine = "rbind") %do% {
  
  ## Format formulas
  outcome <- outcomes[i]
  form_main_out <- sprintf(form_main, outcome)
  form_did_out <- sprintf(form_did, outcome)
  
  ## Regressions
  reg_main <- felm(as.formula(form_main_out), col_long)
  reg_did <- felm(as.formula(form_did_out), col_long)
  
  ## Tidy and return
  out <- bind_rows(
    broom::tidy(reg_main, conf.int = TRUE) %>% filter(term == "periodendline") %>% mutate(outcome = outcome, model = "prepost_diff"),
    broom::tidy(reg_did, conf.int = TRUE) %>% filter(term == "period_x_treatment") %>% mutate(outcome = outcome, model = "diff_in-diff")
  )
  
  return(out)
  
}

#plot 
plot_didresults4 <- ggplot(covid_did_out4,
                            aes(x = reorder(term, -desc(term)), y = estimate)) + 
  geom_hline(aes(yintercept = 0), lty = "dashed", color = "gray60") + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = .15) + 
  geom_label(aes(label = gsub("0\\.", "\\.", round(estimate, 3))), size = 2.5) + 
  facet_wrap(~outcome, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "Treatment", 
       y = "Average Treatment Effects") +
  scale_x_discrete(labels=c("COVID-First x\nEndline", "Endline")) +
  coord_flip() +
  yy_theme()  +
  theme(strip.text = element_blank())


##### PLOTS TOGETHER

(plot_overtime1 / plot_didresults1 / 
    plot_overtime2 / plot_didresults2) +
  plot_layout(heights = c(1, 1, 1, 1))


@

The lack of significance for the DiD results may be a product of our subtle survey prime treatment; perhaps COVID was already on everyone's minds and did not need to be explicitly primed. Nonetheless, because these are panel results and all respondents were affected by the pandemic, we have confidence that we are finding support for the null hypothesis that opinions have been stable over the pandemic. Support for the right to seek asylum remains very high at endline, but receiving the COVID-First prompt does decrease that support by \Sexpr{covid_did_out1[covid_did_out1$model == "diff_in-diff" & covid_did_out1$outcome == "mig_gen_oth_country",]$estimate*100} pp. Among our 16 outcomes, this is the only statistically significant DiD effect.

Even though our respondents experienced significant economic hardship due to the pandemic, as described in the previous section, we find that, if anything, views of Venezuelan migrants as economic competitors have declined. Across all four outcomes, our respondents become \textit{more positive} at endline compared to baseline. However, the difference is not always statistically significant.%at conventional levels.%While the post-pre differences for whether individual respondents think they compete with Venezuelans or whether there is competition over jobs within their city are not statistically significant; agreement that Venezuelans do not take Colombians' jobs increased by \Sexpr{covid_did_out2[covid_did_out2$model == "prepost_diff" & covid_did_out2$outcome == "labor_jobs1",]$estimate*100} pp, and agreement that Venezuelans do not take desirable jobs increased by \Sexpr{covid_did_out2[covid_did_out2$model == "prepost_diff" & covid_did_out2$outcome == "labor_jobs2",]$estimate*100} pp.
\footnote{Once we correct for multiple hypothesis testing in SI Section \ref{SIsec:multhypothesis}, the Benjamini-Hochberg adjusted p-values for these two positive effects remain larger than .05.} 
Figure \ref{fig:mig_gen_did2} in the SI shows no statistically distinguishable changes for the remaining outcomes. %We note that at baseline and endline, the belief that Venezuelans and Colombians share cultural ties is relatively high. %Thus, we find no empirical support for hypothesis 1a. 


\subsection*{Cross-Sectional Estimates with all Endline Respondents}

<<mig_gen_cs, eval = TRUE, echo = FALSE, tidy=TRUE, fig.pos = "t", fig.width = 10.5, fig.height = 9, out.width= ".98\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, fig.cap="For each set of outcomes, the top plot shows endline means by COVID-First treatment (orange) vs. control (blue) across all, new, and panel respondents. The bottom plot shows the treatment effect of COVID-First by group. All estimates include 95\\% CIs.">>=

##### PLOT 1
outcomes <- c("mig_gen_country", "mig_gen_border", "mig_gen_city", "mig_gen_oth_country")

outcomes_names <- c(
                    "mig_gen_country" = "Not too many Vens",
                    "mig_gen_border" = "Border should be open",
                    "mig_gen_city" = "Our city should host Vens",
                    "mig_gen_oth_country" = "Right to seek asylum"
                    )

## Controls
controls <- c("age", 
              "male",
              "city_num", 
              "race_mestizo", 
              "education", 
              "kids", 
              "marriage", 
              "religion_cath",
              "religion_evan",
              "religiosity", 
              "wealth_index")

# Create big dataset
col_endline <- bind_rows(
  col_long %>%
    filter(period == "endline") %>%
    dplyr::select(!!c(outcomes, controls), covid_first) %>%
    mutate(survey_group = "Panelists (endline)"),
  col_new %>%
    dplyr::select(!!c(outcomes, controls), covid_first) %>%
    mutate(survey_group = "New Cross-Sectional Respondents",
           kids = as.numeric(kids)),
  col_cross %>%
    dplyr::select(!!c(outcomes, controls), covid_first) %>%
    mutate(survey_group = "All Respondents",
           kids = as.numeric(kids))
)

## Estimate over-time means ##
treatmentstatus_means <- col_endline %>%
  pivot_longer(!!outcomes, names_to = "outcome_var", values_to = "value") %>%
  group_by(outcome_var, covid_first, survey_group) %>%
  do({
    lm_robust(value~1, data = .) %>% tidy()
  }) %>%
  mutate(est = "Means by Treatment Status")

#plot 
plot_treatmentstatus <- ggplot(treatmentstatus_means, aes(survey_group, estimate, 
                                              group = as.factor(covid_first), 
                         colour = as.factor(covid_first))) + 
  geom_point(position = position_dodge(.4)) + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), 
                width = 0, position = position_dodge(.4)) +
  ylim(0,1) +
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "", y = "Share of Respondents") + 
  scale_colour_manual(values = c("#0072B2","#D55E00")) + 
  scale_x_discrete(labels = c("All", "New", "Panel")) +
  yy_theme() +
  ggtitle("MIGRATION OPENNESS ATTITUDES")

dat_text <- data.frame(
  label = c("COVID-First"),
  outcome_var   = c("mig_gen_border"),
  covid_first = c(0,1)
)

plot_treatmentstatus1 <- plot_treatmentstatus + geom_text(
  data    = dat_text,
  mapping = aes(x = 1.3, y = .5, label = label)
)

## -------------------
## Regression analysis
## -------------------

control_formula <- as.formula(paste0("~", paste0(controls, collapse = "+")))

reg_out1 <- col_endline %>%
  dplyr::select(!!c(outcomes, controls), covid_first, survey_group) %>%
  pivot_longer(cols = !!outcomes, names_to = "outcome_var") %>%
  group_by(outcome_var, survey_group) %>%
  do({
    lm_lin(value~covid_first, covariates = control_formula, data = .) %>% 
      tidy(confint = TRUE) %>%
      filter(term == "covid_first")
  })
  
#plot 
plot_regresults1 <- ggplot(reg_out1, aes(x = survey_group, y = estimate)) + 
  geom_hline(aes(yintercept = 0), lty = "dashed", color = "gray60") + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = .15) + 
  geom_label(aes(label = gsub("0\\.", "\\.", round(estimate, 3))), size = 2.5) + 
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "Survey Group", 
       y = "Average Treatment Effect") +
  coord_flip() +
  scale_x_discrete(labels = function(x)
    str_wrap(str_replace_all(x, "foo" , " "),
             width = 15)) +
  yy_theme() +
  theme(strip.text = element_blank())

##### PLOT 2
outcomes <- c("labor_jobs1", "labor_jobs2", "labor_compete1", "labor_compete2")

outcomes_names <- c(
                    "labor_jobs1" = "Vens do not take Cols' jobs",
                    "labor_jobs2" = "Vens do not take desirable jobs",
                    "labor_compete1" = "I do not compete w/ Vens",
                    "labor_compete2" = "Cols in my city\ndo not compete w/ Vens"
                    )

## Controls
controls <- c("age", 
              "male",
              "city_num", 
              "race_mestizo", 
              "education", 
              "kids", 
              "marriage", 
              "religion_cath",
              "religion_evan",
              "religiosity", 
              "wealth_index")

# Create big dataset
col_endline <- bind_rows(
  col_long %>%
    filter(period == "endline") %>%
    dplyr::select(!!c(outcomes, controls), covid_first) %>%
    mutate(survey_group = "Panelists (endline)"),
  col_new %>%
    dplyr::select(!!c(outcomes, controls), covid_first) %>%
    mutate(survey_group = "New Cross-Sectional Respondents",
           kids = as.numeric(kids)),
  col_cross %>%
    dplyr::select(!!c(outcomes, controls), covid_first) %>%
    mutate(survey_group = "All Respondents",
           kids = as.numeric(kids))
)

## Estimate over-time means ##
treatmentstatus_means <- col_endline %>%
  pivot_longer(!!outcomes, names_to = "outcome_var", values_to = "value") %>%
  group_by(outcome_var, covid_first, survey_group) %>%
  do({
    lm_robust(value~1, data = .) %>% tidy()
  }) %>%
  mutate(est = "Means by Treatment Status")

#plot 
plot_treatmentstatus <- ggplot(treatmentstatus_means, aes(survey_group, estimate, 
                                              group = as.factor(covid_first), 
                         colour = as.factor(covid_first))) + 
  geom_point(position = position_dodge(.4)) + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), 
                width = 0, position = position_dodge(.4)) +
  ylim(0,1) +
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "", y = "Share of Respondents") + 
  scale_x_discrete(labels = c("All", "New", "Panel")) +
  scale_colour_manual(values = c("#0072B2","#D55E00")) + 
  yy_theme() +
  ggtitle("MIGRANTS COMPETE FOR EMPLOYMENT")

dat_text <- data.frame(
  label = c("COVID-First"),
  outcome_var   = c("labor_compete1"),
  covid_first = c(0,1)
)

plot_treatmentstatus2 <- plot_treatmentstatus + geom_text(
  data    = dat_text,
  mapping = aes(x = 1.3, y = .4, label = label)
)

## -------------------
## Regression analysis
## -------------------

control_formula <- as.formula(paste0("~", paste0(controls, collapse = "+")))

reg_out2 <- col_endline %>%
  dplyr::select(!!c(outcomes, controls), covid_first, survey_group) %>%
  pivot_longer(cols = !!outcomes, names_to = "outcome_var") %>%
  group_by(outcome_var, survey_group) %>%
  do({
    lm_lin(value~covid_first, covariates = control_formula, data = .) %>% 
      tidy(confint = TRUE) %>%
      filter(term == "covid_first")
  })
  

#plot 
plot_regresults2 <- ggplot(reg_out2, aes(x = survey_group, y = estimate)) + 
  geom_hline(aes(yintercept = 0), lty = "dashed", color = "gray60") + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = .15) + 
  geom_label(aes(label = gsub("0\\.", "\\.", round(estimate, 3))), size = 2.5) + 
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "Survey Group", 
       y = "Average Treatment Effect") +
  coord_flip() +
  scale_x_discrete(labels = function(x)
    str_wrap(str_replace_all(x, "foo" , " "),
             width = 15)) +
  yy_theme() +
  theme(strip.text = element_blank())

##### PLOT 3
outcomes <- c("fisc_service", "fisc_aid", 
              "socio_gen", "sec_conflict")

outcomes_names <- c(
                    "fisc_service" = "W/ Vens easier to access services",
                    "fisc_aid" = "Enough aid to handle migrants",
                    "socio_gen" = "Vens presence benefits Cols",
                    "sec_conflict" = "Vens presence mitigates conflict"
                    )

## Controls
controls <- c("age", 
              "male",
              "city_num", 
              "race_mestizo", 
              "education", 
              "kids", 
              "marriage", 
              "religion_cath",
              "religion_evan",
              "religiosity", 
              "wealth_index")

# Create big dataset
col_endline <- bind_rows(
  col_long %>%
    filter(period == "endline") %>%
    dplyr::select(!!c(outcomes, controls), covid_first) %>%
    mutate(survey_group = "Panelists (endline)"),
  col_new %>%
    dplyr::select(!!c(outcomes, controls), covid_first) %>%
    mutate(survey_group = "New Cross-Sectional Respondents",
           kids = as.numeric(kids)),
  col_cross %>%
    dplyr::select(!!c(outcomes, controls), covid_first) %>%
    mutate(survey_group = "All Respondents",
           kids = as.numeric(kids))
)

## Estimate over-time means ##
treatmentstatus_means <- col_endline %>%
  pivot_longer(!!outcomes, names_to = "outcome_var", values_to = "value") %>%
  group_by(outcome_var, covid_first, survey_group) %>%
  do({
    lm_robust(value~1, data = .) %>% tidy()
  }) %>%
  mutate(est = "Means by Treatment Status")

#plot 
plot_treatmentstatus <- ggplot(treatmentstatus_means, aes(survey_group, estimate, 
                                              group = as.factor(covid_first), 
                         colour = as.factor(covid_first))) + 
  geom_point(position = position_dodge(.4)) + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), 
                width = 0, position = position_dodge(.4)) +
    ylim(0,1) +
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "", y = "Share of Respondents") + 
  scale_x_discrete(labels = c("All", "New", "Panel")) +
  scale_colour_manual(values = c("#0072B2","#D55E00")) + 
  yy_theme() +
  ggtitle("MIGRANTS BRING BENEFITS")

dat_text <- data.frame(
  label = c("COVID-First"),
  outcome_var   = c("fisc_aid"),
  covid_first = c(0,1)
)

plot_treatmentstatus3 <- plot_treatmentstatus + geom_text(
  data    = dat_text,
  mapping = aes(x = 1.3, y = .4, label = label)
)

## -------------------
## Regression analysis
## -------------------

control_formula <- as.formula(paste0("~", paste0(controls, collapse = "+")))

reg_out3 <- col_endline %>%
  dplyr::select(!!c(outcomes, controls), covid_first, survey_group) %>%
  pivot_longer(cols = !!outcomes, names_to = "outcome_var") %>%
  group_by(outcome_var, survey_group) %>%
  do({
    lm_lin(value~covid_first, covariates = control_formula, data = .) %>% 
      tidy(confint = TRUE) %>%
      filter(term == "covid_first")
  })
  

#plot 
plot_regresults3 <- ggplot(reg_out3, aes(x = survey_group, y = estimate)) + 
  geom_hline(aes(yintercept = 0), lty = "dashed", color = "gray60") + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = .15) + 
  geom_label(aes(label = gsub("0\\.", "\\.", round(estimate, 3))), size = 2.5) + 
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "Survey Group", 
       y = "Average Treatment Effect") +
  coord_flip() +
  scale_x_discrete(labels = function(x)
    str_wrap(str_replace_all(x, "foo" , " "),
             width = 15)) +
  yy_theme() +
  theme(strip.text = element_blank())

##### PLOT 4
outcomes <- c("socio_work", "socio_integrate", 
              "pol_left", "hist_culture")

outcomes_names <- c(
                    "socio_work" = "Vens are hardworking",
                    "socio_integrate" = "Vens integrate successfully",
                    "pol_left" = "Vens are leftist",
                    "hist_culture" = "Cols and Vens share cultural ties"
                    )

## Controls
controls <- c("age", 
              "male",
              "city_num", 
              "race_mestizo", 
              "education", 
              "kids", 
              "marriage", 
              "religion_cath",
              "religion_evan",
              "religiosity", 
              "wealth_index")

# Create big dataset
col_endline <- bind_rows(
  col_long %>%
    filter(period == "endline") %>%
    dplyr::select(!!c(outcomes, controls), covid_first) %>%
    mutate(survey_group = "Panelists (endline)"),
  col_new %>%
    dplyr::select(!!c(outcomes, controls), covid_first) %>%
    mutate(survey_group = "New Cross-Sectional Respondents",
           kids = as.numeric(kids)),
  col_cross %>%
    dplyr::select(!!c(outcomes, controls), covid_first) %>%
    mutate(survey_group = "All Respondents",
           kids = as.numeric(kids))
)

## Estimate over-time means ##
treatmentstatus_means <- col_endline %>%
  pivot_longer(!!outcomes, names_to = "outcome_var", values_to = "value") %>%
  group_by(outcome_var, covid_first, survey_group) %>%
  do({
    lm_robust(value~1, data = .) %>% tidy()
  }) %>%
  mutate(est = "Means by Treatment Status")

#plot 
plot_treatmentstatus <- ggplot(treatmentstatus_means, aes(survey_group, estimate, 
                                              group = as.factor(covid_first), 
                         colour = as.factor(covid_first))) + 
  geom_point(position = position_dodge(.4)) + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), 
                width = 0, position = position_dodge(.4)) +
  ylim(0,1) +
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "", y = "Share of Respondents") + 
  scale_colour_manual(values = c("#0072B2","#D55E00")) + 
  scale_x_discrete(labels = c("All", "New", "Panel")) +
  yy_theme() +
  ggtitle("MIGRANTS CAN INTEGRATE")


dat_text <- data.frame(
  label = c("COVID-First"),
  outcome_var   = c("hist_culture"),
  covid_first = c(0,1)
)

plot_treatmentstatus4 <- plot_treatmentstatus + geom_text(
  data    = dat_text,
  mapping = aes(x = 1.3, y = .5, label = label)
) 

## -------------------
## Regression analysis
## -------------------

control_formula <- as.formula(paste0("~", paste0(controls, collapse = "+")))

reg_out4 <- col_endline %>%
  dplyr::select(!!c(outcomes, controls), covid_first, survey_group) %>%
  pivot_longer(cols = !!outcomes, names_to = "outcome_var") %>%
  group_by(outcome_var, survey_group) %>%
  do({
    lm_lin(value~covid_first, covariates = control_formula, data = .) %>% 
      tidy(confint = TRUE) %>%
      filter(term == "covid_first")
  })
  

#plot 
plot_regresults4 <- ggplot(reg_out4, aes(x = survey_group, y = estimate)) + 
  geom_hline(aes(yintercept = 0), lty = "dashed", color = "gray60") + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = .15) + 
  geom_label(aes(label = gsub("0\\.", "\\.", round(estimate, 3))), size = 2.5) + 
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "Survey Group", 
       y = "Average Treatment Effect") +
  coord_flip() +
  scale_x_discrete(labels = function(x)
    str_wrap(str_replace_all(x, "foo" , " "),
             width = 15)) +
  yy_theme() +
  theme(strip.text = element_blank())

##### PLOT TOGETHER
(plot_treatmentstatus1 / plot_regresults1 / 
    plot_treatmentstatus2 / plot_regresults2) +
  plot_layout(heights = c(1, 1, 1, 1))

@

Next, we focus on the cross-sectional analysis by comparing COVID-First treatment and control groups at endline with our panelists and new respondents. In Figure \ref{fig:mig_gen_cs}, the top panel shows the group averages for COVID-First treatment (orange) vs. control (blue) across all, new, and panel respondents. The bottom panel shows the treatment effect of COVID-First by group. Like the DiD results, receiving the COVID-First module first has almost no effect. We also see that the results between our new respondents and panelists are similar across all outcomes, except for the right to seek asylum. These similarities suggest that the panel results above are not due to non-random attrition.

Overall, our respondents hold generally negative attitudes about Venezuelans. Nonetheless, while Colombians have these negative views, these views did not change due to COVID-19. Priming our respondents to consider COVID before answering these questions did not affect their attitudes much. Thus, our results are in line with the null hypotheses. 


\subsection*{Migration and COVID Endline-only Attitudes}

<<mig_cov_results, eval = TRUE, echo = FALSE, tidy=TRUE, fig.pos = 't', fig.width = 10, fig.height = 6, out.width= "1\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, fig.cap="This figure shows questions about Venezuelan migrants and COVID asked at endline. The top plot shows the proportion of new (orange), panel (black), and all (blue) respondents who agreed with the statement. The bottom plot shows the treatment effect of COVID-First. All estimates include 95\\% CIs.">>=

outcomes_cs <- c("mig_cov_vector", "mig_cov_resource", "mig_cov_assist", "mig_cov_essw", 
                 "mig_cov_border", "mig_cov_return", "mig_cov_reg", "sympathy")

outcomes_cs_names <- c(
                    "mig_cov_vector" = "Vens no more\nlikely to spread COVID",
                    "mig_cov_resource" = "Vens not using\nup health resources",
                    "mig_cov_assist" = "Vens not getting\nmore assistance",
                    "mig_cov_essw" = "Vens are\nessential workers",
                    "mig_cov_border" = "Open border\nduring COVID",
                    "mig_cov_return" = "Vens should\nremain in Col",
                    "mig_cov_reg" = "Vens obey\nprotocols",
                    "sympathy" = "Vens deserve\nsympathy"
                    )

controls <- c("age", "male", "city_num", 
              "race_mestizo", "education", "kids", "marriage", 
              "religion_cath","religion_evan","religiosity", "wealth_index")

## Create big dataset
col_endline <- bind_rows(
  col_long %>%
    filter(period == "endline") %>%
    dplyr::select(!!c(outcomes_cs, controls), covid_first) %>%
    mutate(survey_group = "Panel Respondents"),
  col_new %>%
    dplyr::select(!!c(outcomes_cs, controls), covid_first) %>%
    mutate(survey_group = "New Respondents",
           kids = as.numeric(kids)),
  col_cross %>%
    dplyr::select(!!c(outcomes_cs, controls), covid_first) %>%
    mutate(survey_group = "All Respondents",
           kids = as.numeric(kids))
)

## Means
means <- col_endline %>%
  dplyr::select(survey_group, !!outcomes_cs) %>%
  pivot_longer(cols = -survey_group, names_to = "outcome_var") %>%
  group_by(survey_group, outcome_var) %>%
  do({
    lm_robust(value~1, data = .) %>% tidy(confint = TRUE)
  })

## Treatment effects
control_formula <- as.formula(paste0("~", paste0(controls, collapse = "+")))

treatment_effects <- col_endline %>%
  dplyr::select(!!c(outcomes_cs, controls), covid_first, survey_group) %>%
  pivot_longer(cols = !!outcomes_cs, names_to = "outcome_var") %>%
  group_by(outcome_var, survey_group) %>%
  do({
    lm_lin(value~covid_first, covariates = control_formula, data = .) %>% 
      tidy(confint = TRUE) %>%
      filter(term == "covid_first")
  })

## Plot
df_plot <- bind_rows(
  means %>% mutate(est_type = "Proportion of Respondents"),
  treatment_effects %>% mutate(est_type = "Treatment Effect of COVID-First")
) %>%
  mutate(survey_group = as.factor(survey_group),
         survey_group = fct_relevel(survey_group, "New Respondents", "Panel Respondents", "All Respondents"))

pd <- position_dodge(.8)

ggplot(df_plot, aes(outcome_var, estimate, group = survey_group, colour = survey_group)) + 
  geom_hline(data = data.frame(est_type = "Treatment Effect of COVID-First", y = 0), 
             aes(yintercept = y), lty = "dashed", color = "gray60") + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = .15, position = pd) + 
  geom_label(aes(label = gsub("0\\.", "\\.", round(estimate, 3))), size = 2.5, position = pd) + 
  scale_x_discrete(labels=outcomes_cs_names) + 
  facet_wrap(~est_type, scales = "free_y", nrow = 2) +
  scale_colour_manual(values = c("#D55E00", "black", "#0072B2"), name = "Group", labels = c("New", "Panel", "All")) + 
  theme(
    axis.ticks.x=element_blank(),
    axis.title.x = element_blank(),
    panel.background = element_blank(),
    panel.border = element_rect(colour = "gray", fill=NA, size=.8),
    axis.text.x = element_text(angle=0, vjust=0, hjust = .4, size=9),
    legend.position = "none")


@

Finally, we show responses about Venezuelan migrants in relation to COVID-19 asked only at endline. In the top panel of Figure \ref{fig:mig_cov_results}, we present the proportion of respondents by group who agreed to each statement. As before, we do not find evidence of widespread antipathy towards Venezuelans. While \Sexpr{(1-df_plot[df_plot$survey_group == "All Respondents" & df_plot$outcome_var == "mig_cov_border" & df_plot$est_type == "Proportion of Respondents",]$estimate)*100}\% of respondents want the border to remain closed, \Sexpr{(df_plot[df_plot$survey_group == "All Respondents" & df_plot$outcome_var == "mig_cov_return" & df_plot$est_type == "Proportion of Respondents",]$estimate)*100}\% believe that Venezuelans should remain in Colombia, and 
\Sexpr{(df_plot[df_plot$survey_group == "All Respondents" & df_plot$outcome_var == "sympathy" & df_plot$est_type == "Proportion of Respondents",]$estimate)*100}\% say that Venezuelans deserve sympathy.  

Moreover, respondents believe that Venezuelan migrants are following the health protocols (\Sexpr{(df_plot[df_plot$survey_group == "All Respondents" & df_plot$outcome_var == "mig_cov_reg" & df_plot$est_type == "Proportion of Respondents",]$estimate)*100}\%) and a large plurality (\Sexpr{(df_plot[df_plot$survey_group == "All Respondents" & df_plot$outcome_var == "mig_cov_vector" & df_plot$est_type == "Proportion of Respondents",]$estimate)*100}\%) think that they are no more likely to spread COVID than Colombians. Nor is it the case that Colombians overwhelming think that Venezuelans are using more than their fair share of resources: half of respondents think Venezuelans are not getting more assistance than Colombians, and \Sexpr{(df_plot[df_plot$survey_group == "All Respondents" & df_plot$outcome_var == "mig_cov_resource" & df_plot$est_type == "Proportion of Respondents",]$estimate)*100}\% think that they are not using up scarce health resources. Again, the responses between the new respondents and the panel are statistically indistinguishable. In the bottom panel of Figure \ref{fig:mig_cov_results}, we examine how priming respondents to think about COVID first affects answers, and we find null results once again, suggesting that priming COVID has had little impact on opinions towards migration.\footnote{In SI Section \ref{SIsec:migfirst}, we show null effects of receiving the Migration-First question module on the COVID questions, i.e., there was no priming effect of migration on COVID attitudes.}


\subsection*{Heterogeneous Treatment Effects by Economic Stability, COVID Exposure, and other Respondent Characteristics}

<<mig_gen_cs_cov_lostjob, eval = TRUE, echo = FALSE, tidy=TRUE, fig.width = 8, fig.height = 5, out.width= ".9\\linewidth", fig.align='center', warning=FALSE, message=FALSE, strip.white=TRUE, fig.cap="Migration Openness Outcomes, heterogeneous effects by whether the respondent lost their job (1) or not (0).">>=

outcomes <- c("mig_gen_country", "mig_gen_border", "mig_gen_city", "mig_gen_oth_country")

outcomes_names <- c(
                    "mig_gen_country" = "Not too many Vens",
                    "mig_gen_border" = "Border should be open",
                    "mig_gen_city" = "Our city should host Vens",
                    "mig_gen_oth_country" = "Right to seek asylum"
                    )

## Controls
controls <- c("age", 
              "male",
              "city_num", 
              "race_mestizo", 
              "education", 
              "kids", 
              "marriage", 
              "religion_cath",
              "religion_evan",
              "religiosity", 
              "wealth_index")

# Create big dataset
col_endline <- bind_rows(
  col_long %>%
    filter(period == "endline") %>%
    dplyr::select(!!c(outcomes, controls), cov_lostjob, covid_first) %>%
    mutate(survey_group = "Panelists (endline)"),
  col_new %>%
    dplyr::select(!!c(outcomes, controls), cov_lostjob, covid_first) %>%
    mutate(survey_group = "New Cross-Sectional Respondents",
           kids = as.numeric(kids)),
  col_cross %>%
    dplyr::select(!!c(outcomes, controls), cov_lostjob, covid_first) %>%
    mutate(survey_group = "All Respondents",
           kids = as.numeric(kids))
)

## Estimate over-time means ##
treatmentstatus_means <- col_endline %>%
  pivot_longer(!!c(outcomes), names_to = "outcome_var", values_to = "value") %>%
  filter(survey_group == "All Respondents" & !is.na(cov_lostjob)) %>%
  group_by(outcome_var, covid_first, cov_lostjob) %>%
  do({
    lm_robust(value~1, data = .) %>% tidy()
  }) %>%
  mutate(est = "Means by Treatment Status")

#plot 
plot_treatmentstatus <- ggplot(treatmentstatus_means, aes(as.factor(cov_lostjob), estimate, 
                                              group = as.factor(covid_first), 
                         colour = as.factor(covid_first))) + 
  geom_point(position = position_dodge(.4)) + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), 
                width = 0, position = position_dodge(.4)) +
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "Lost Job due to COVID", y = "Share of Respondents") + 
  scale_colour_manual(values = c("#0072B2","#D55E00")) + 
  #scale_x_discrete(labels = c("All", "New", "Panel")) +
  yy_theme()

dat_text <- data.frame(
  label = c("Covid-First"),
  cov_lostjob = as.factor(0),
  outcome_var   = c("mig_gen_border"),
  covid_first = c(0,1)
)

plot_treatmentstatus <- plot_treatmentstatus + geom_text(
  data    = dat_text,
  mapping = aes(x = 1.3, y = .5, label = label)
)

## -------------------
## Regression analysis
## -------------------

control_formula <- as.formula(paste0("~", paste0(controls, collapse = "+")))

reg_out <- col_endline %>%
  filter(survey_group == "All Respondents" & !is.na(cov_lostjob)) %>%
  dplyr::select(!!c(outcomes, controls), cov_lostjob, covid_first) %>%
  pivot_longer(cols = !!outcomes, names_to = "outcome_var") %>%
  group_by(outcome_var, cov_lostjob) %>%
  do({
    lm_lin(value~covid_first, covariates = control_formula, data = .) %>% 
      tidy(confint = TRUE) %>%
      filter(term == "covid_first")
  })
  

#plot 
plot_regresults <- ggplot(reg_out, aes(x = as.factor(cov_lostjob), y = estimate)) + 
  geom_hline(aes(yintercept = 0), lty = "dashed", color = "gray60") + 
  geom_errorbar(aes(ymin = conf.low, ymax = conf.high), width = .15) + 
  geom_label(aes(label = gsub("0\\.", "\\.", round(estimate, 3))), size = 2.5) + 
  facet_wrap(~outcome_var, labeller = as_labeller(outcomes_names), nrow = 1) +
  labs(x = "Lost Job due to COVID", 
       y = "Average Treatment Effect") +
  coord_flip() +
  scale_x_discrete(labels = function(x)
    str_wrap(str_replace_all(x, "foo" , " "),
             width = 15)) +
  yy_theme()

(plot_treatmentstatus + ggtitle("MIGRATION OPENNESS ATTITUDES")) /
  plot_regresults
@

While we do not find much change in opinion overall, it could still be the case that COVID had heterogeneous effects. Importantly, although many people were hurt by the economic effects of the pandemic and related lockdowns, others kept their jobs and incomes. We observe differences between respondents who experienced economic loss or not, providing support for our theorized indirect mechanism of economic effects. From Figure \ref{fig:mig_gen_cs_cov_lostjob}, those who did not lose their job (\Sexpr{(table(col_cross$cov_lostjob)[1]/table(is.na(col_cross$cov_lostjob))[1])*100}\%) had \textit{positive effects} for the following questions: their city should host more Venezuelans and that there are not too many Venezuelans in Colombia. SI Section \ref{SIsec:het} shows additional positive results for this subgroup and for those who did not lose income (\Sexpr{(table(col_cross$income_loss)[1]/table(is.na(col_cross$income_loss))[1])*100}\%) on the following outcome: that people should have the right to seek asylum, Venezuelans can integrate successfully, and the presence of Venezuelans makes it easier for Colombians to access public services. This suggests that those who remained economically stable or increased their economic situation were better able to weather the pandemic and felt more positively toward Venezuelan migrants.

Another possibility is that direct exposure to the pandemic triggers the response, as predicted by BIS, but we find little support for this. When comparing those who had COVID (\Sexpr{(table(col_cross$cov_self)[2]/table(is.na(col_cross$cov_self))[1])*100}\%) or had a family member with COVID (\Sexpr{(table(col_cross$cov_family)[2]/table(is.na(col_cross$cov_family))[1])*100}\%) versus not, we found no statistically significant effects, although admittedly this study is not well-powered to detect subgroup effects. Thus, direct experiences with the pandemic did not change attitudes toward Venezuelan migrants. Those who fell ill or had sick family members had similar opinions as those who weathered the pandemic better. 

Next, while we chose the case of Venezuelans in Colombia to largely set aside concerns about cultural differences in terms of religion, language, race, and ethnicity, in order to isolate any economic effects, cultural concerns may still exist. At baseline, we do find a weak but positive correlation (\Sexpr{cor.test(col_wide$hist_culture_b, col_wide$mig_gen_border_b)$est}) between believing that Venezuelans share cultural ties and support for open borders. 
Nevertheless, SI Figures \ref{fig:mig_gen_did2} and \ref{fig:mig_gen_cs2} confirm that most Colombians think that Venezuelans share cultural ties and these views did not change over the pandemic. 
Finally, we might expect that individuals who have close contact with Venezuelans should believe that there is a smaller cultural distance between Colombians and Venezuelans than those without close contacts. In SI Figures \ref{fig:mig_gen_cs_ven_friends_bi} and \ref{fig:mig_cov_results_ven_friends_bi}, we show that there is no effect of having Venezuelan friends on these attitudes.
Thus, we do not think that cultural concerns in our case affect changes in attitudes during a pandemic.

We also examined heterogeneous treatment effects for those who are concerned about security worsening due to COVID (\Sexpr{(table(col_cross$cov_concern_three_security)[2]/table(is.na(col_cross$cov_concern_three_security))[1])*100}\%) versus not; those who report having Venezuelan friends (\Sexpr{(table(col_cross$ven_friends_bi)[2]/table(is.na(col_cross$ven_friends_bi))[1])*100}\%); and those who view Venezuelans as essential workers (\Sexpr{(table(col_cross$mig_cov_essw)[2]/table(is.na(col_cross$mig_cov_essw))[1])*100}\%) versus not and found no statistically distinguishable differences.

Likewise, it may be that respondents in Cali felt differently than those in Cúcuta, because Cali had smaller concentrations of migrants and more COVID-19 cases. However, empirically we find no differences comparing respondents living in the two cities. Finally, we examined the effects by views about how the government responded, and again there are basically no differences for respondents who believed that either the national or local governments’ responses were sufficient or not.\footnote{These last two heterogeneous effects analyses were not in our PAP. They were requested by reviewers.}


\section*{Discussion: Understanding the Lack of Increased Xenophobia}

We found that, except for those whose who did not lose their job or income, most respondents did not change their attitudes toward Venezuelans. 
What explains these null results?  First, we do not think that the results are explained by any waning of the pandemic --- as we noted above our respondents were in a second lockdown due to a post-holiday surge making COVID highly relevant during this time --- or are the result of changes in government policy per se. While the Colombian government did close the border, the political environment has become \textit{more welcoming} toward Venezuelans during the pandemic. The Colombian government announced a moratorium on evictions of Venezuelans and Venezuelans, regardless of status, had access to public health services in case of a COVID-19 infection.\footnote{\url{https://mixedmigration.org/wp-content/uploads/2021/04/167_access_health_services_Venezuelans_in_Colombia_and_Peru_during_COVID19.pdf} In fact, all Venezuelans were eligible for emergency care in Colombia before the pandemic. \url{https://www.npr.org/sections/goatsandsoda/2019/08/20/751192495/free-health-care-for-venezuelans-in-colombia-isn-t-always-free}}  We examined newspaper stories in Colombia that mentioned both migrants and COVID (see SI Section \ref{SIsec:text_analysis}).  While there isn't a clear pattern in the sentiment of these stories, they are mostly negative from the start of the pandemic until Duque's announcement of a 10-year visa for Venezuelans (the PPT).  Stories are broadly positive from that point until after the land border reopens. In addition, according to data from Latinobarometer, opinions on immigration in Colombia are largely unchanged from 2020 to 2023 \citep{latinobarometro2020, latinobarometro2023}, which suggest that the policy has had little effect on opinion.  
 
Instead, we theorize that elite rhetoric scapegoating, or the lack thereof, plays a central role in stabilizing views. Scholars have found that hostile elite rhetoric can affect attitudes on immigration in general \citep{Czymara2020propagated, flores2018can, schleiter2021can} and during a pandemic \citep[25]{dionne2020politics}. Notably, at the onset of the pandemic, Trump and other prominent right-wing politicians and media figures in the Global North started referring to COVID-19 as the ``Wuhan virus,'' ``Chinese virus,'' and ``Kung Flu,'' thereby othering and scapegoating Chinese people and the broader Asian/Asian-American communities. It was not only Asian immigrants and Asian-Americans who were targeted during the pandemic; the Trump administration also used the health crisis to stop asylum-seekers, most of whom are from Central America, from entering the US under Title 42 even when health officials argued that was unnecessary \citep{dearen2020Pence}. Using Twitter data, \citet{chan_kim_leung_2021} find that Trump's framing of COVID-19 as the ``Chinese virus'' normalized and increased anti-Asian sentiment among other political elites and the American public. Similarly, to explain the rise of hate crimes against Asians in Italy, \citet{dipoppa2023locked} point to mobilization by local far-right leaders and institutions.

In contrast to those countries, Colombian politicians did not scapegoat immigrants during the pandemic \citep[see also][]{argote2024formation}. To understand how elites were framinng migrants during this time, we searched Twitter, which politicians in Colombia often use, to analyze whether politicians were linking Venezuelan migrants with the pandemic. Our search spanned from October 1, 2019 to May 30, 2022. We focused on President Iván Duque and mayors of the largest Colombian cities during the pandemic (2020-2023). We also included the mayor of Cúcuta, the main bordering municipality with Venezuela.

Although politicians often talked about the pandemic and the Venezuelan migration crisis, they did not link migrants with the spread of COVID-19. Instead, politicians saw Venezuelan migrants as victims of the pandemic and used congenial rhetoric. For instance, President Duque wrote on Twitter that "Venezuelan migrants face dictatorship and now a pandemic; we cannot refer to them in a derogatory manner. Despite difficulties, we will continue to work for them with the social programs we have and will continue to do so hand in hand with mayors and governors." (April 4, 2020). 

Nor do we think that politicians did not scapegoat Venezuelans because of some perceived cultural brotherhood. Indeed, during election years both \citet{rozo2021brothers}, \citet{holland2024left} show that right-leaning politicians use Venezuelans as tool to whip up support. Perhaps what is different in our case for both the prior findings in Colombia or the finding of elite scapegoating in the US and Italy is that 2020 and 2021 were not election years in Colombia.\footnote{Italy held a referendum on constitutional reform and regional elections in 2020.} 

\section*{Conclusion}

This paper examines whether and how the COVID-19 pandemic has changed opinions toward migrants in a significant migrant-hosting country within the Global South, Colombia and helps us understand if our theories developed in the Global North context travel. Yet, it has implications for the states in the Global North. Using a combination of a panel survey and an embedded survey experiment, we find that COVID largely has not affected Colombians' views towards Venezuelans. While Colombians hold negative views overall, their views have stayed the same, or, for those who kept their jobs through the pandemic, their attitudes have become more positive.

Our overall null results may be due to the relative lack of ``othering'' by political elites of Venezuelans as carriers of disease or as the cause of other harms during the pandemic. While the Colombian government did close the border, the policy environment during the time of our study became \textit{more welcoming}. The government announced a moratorium on evictions of Venezuelans and gave them access to public health services in case of a COVID-19 infection.\footnote{\url{https://mixedmigration.org/wp-content/uploads/2021/04/167_access_health_services_Venezuelans_in_Colombia_and_Peru_during_COVID19.pdf} In fact, all Venezuelans were eligible for emergency care in Colombia before the pandemic. \url{https://www.npr.org/sections/goatsandsoda/2019/08/20/751192495/free-health-care-for-venezuelans-in-colombia-isn-t-always-free}} This is not to say that political elites did not use rhetoric to frame Venezuelans negatively; they have focused on how Venezuelan migrants in Colombia might pull politics towards the left around election time \citep{holland2024left}. But, they have not done so by explicitly linking COVID to xenophobic fears, perhaps because the worst of the pandemic did not overlap with an election. Therefore, xenophobia need not follow public health crises. How elites frame migrants during crises is a critical component, a lens through which everyday citizens will view those migrants \citep{Czymara2020propagated}. 

Finally, our study provides a relatively hopeful message. As we saw in several other countries, politicians used scapegoating of minorities and immigrants during the pandemic for electoral gain. This scapegoating, in turn, allowed politicians to enact policies that exclude migrants from social services and provide individuals permission to engage in discrimination and xenophobic behaviors. Our study, however, highlights a case of the dog that didn't bark. Through this case, we optimistically claim that growing xenophobia towards outsiders need not be an inevitable repercussion of pandemics. We should study further to understand when elite scapegoating is effective and how to disincentivize it in the future.

%%%%%% REFERENCES %%%%%%%
\newpage
\setstretch{1}
\bibliography{colombiacovid}

\end{document}

